Fix music selection to match TU19 behavior

Menu music (menu1-4) now plays only on the title screen, creative
music (creative1-6) only plays in creative mode, and survival mode
correctly plays only calm/hal/nuance/piano tracks. Reordered the
eMUSICFILES enum so piano tracks are contiguous with the survival
range, added game-mode-aware track selection via getOverworldMusicID,
and re-enabled the playStreaming call in setLevel to stop menu music
when entering gameplay. Added debug logging for track selection.
This commit is contained in:
Revela
2026-03-21 12:32:22 -05:00
parent cbbac3936c
commit c62d5e6ff4
4 changed files with 90 additions and 25 deletions

View File

@@ -4330,8 +4330,8 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt
this->progressRenderer->progressStage(-1);
}
// 4J-PB - since we now play music in the menu, just let it keep playing
//soundEngine->playStreaming(L"", 0, 0, 0, 0, 0);
// Stop menu music and transition to game music for the new level
soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
// 4J - stop update thread from processing this level, which blocks until it is safe to move on - will be re-enabled if we set the level to be non-nullptr
gameRenderer->DisableUpdateThread();