The bug
On the pause screen (Esc
menu) and its subscreens the game and sounds are paused in singleplayer.
However, there are other UI screens which pause the game, but do not pause the sounds.
Affected screens
command block screen
sign editing screen(WAI as per MC-261292)book screen
advancement screen (opened by pressing
L
)
How to reproduce
Put a record in a jukebox
Jump and right click a command block
→ ❌ The game will pause (you will stay in mid-air), but the music will keep playing
Code analysis (advancement screen)
By @unknown can be found in this comment
Linked issues
is duplicated by 17
relates to 4
Attachments
Comments 9
Can confirm for MC 1.20.4.
I would like to add that I quit my singleplayer world while flying with an Elytra and the flying sound persisted until I reloaded my resources.
Please link this comment in the description
The following is based on a decompiled version of Minecraft 1.12 using MCP 9.40 pre-1.
When a game pausing GUI is opened, for instance the ingame menu, sounds are paused manually with the method call
net.minecraft.client.Minecraft.mcSoundHandler.pauseSounds();
. However, when the button "L" is pressed, the loop to open the advancements menu doesn't perform this specific method call. Therefore, a simple solution to this problem would be to add the method call to the loop.Suggested fix