aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
authorMarlian <84173858+MCbabel@users.noreply.github.com>2026-03-05 11:22:55 +0100
committerGitHub <noreply@github.com>2026-03-05 17:22:55 +0700
commitc236e46ef6dc5078015d8ea473307f4aec521fe5 (patch)
tree05f864d813e110dff98a521335c52c6d07af9816 /Minecraft.Client
parentc2da9e90f8ea5c8dbb7a1a838380bbca1804eb86 (diff)
Fix music disc sound leaking across dimensions (#552)
Stop streaming music (jukebox) when the player changes dimensions so music disc sounds from the overworld cannot be heard in the nether or vice versa. Previously, the streaming audio continued playing at its original world coordinates even after a dimension change, causing the sound to leak into the new dimension at the same position. Fixes #411
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/ClientConnection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp
index 8123a2f0..02a7837d 100644
--- a/Minecraft.Client/ClientConnection.cpp
+++ b/Minecraft.Client/ClientConnection.cpp
@@ -2694,6 +2694,10 @@ void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet)
int oldDimension = minecraft->localplayers[m_userIndex]->dimension;
started = false;
+ // Stop any streaming music (e.g. jukebox) when changing dimensions
+ // so it doesn't leak into the new dimension
+ level->playStreamingMusic(L"", 0, 0, 0);
+
// Remove client connection from this level
level->removeClientConnection(this, false);