-
Bug
-
Resolution: Unresolved
-
None
-
1.15, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 21w03a, 1.17.1, 1.18 Pre-release 1, 1.18, 1.18.1, 1.18.2, 1.19 Pre-release 3, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.21, 1.21.3, 1.21.4
-
Confirmed
-
Sound
The Bug:
The sounds of pages in books rustling aren't controlled by any sound sliders.
Steps to Reproduce:
- Navigate to the "Music & Sounds" settings menu.
- Turn the "Master Volume" sound slider to "100%".
- Turn every other sound slider to "OFF".
- Exit this menu and obtain a book and quill.
- Flip between pages in the book and quill and listen closely as you do this.
- Take note as to whether or not the sounds of pages in books rustling are controlled by any sound sliders.
Observed Behavior:
There is no assigned sound slider for these sounds.
Expected Behavior:
There would be an assigned sound slider. The "Players" sound slider would work nicely.
Code Analysis (tentative):
Code analysis by Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn. Please note that I'm quite tentative about this analysis, although I'm persuaded to believe that this is likely the cause of the problem.
public class PageButton extends Button { ... public void playDownSound(SoundManager p_99231_) { if (this.playTurnSound) { p_99231_.play(SimpleSoundInstance.forUI(SoundEvents.BOOK_PAGE_TURN, 1.0F)); } } ...
If we look at the above class, we can see that the sounds of pages in books rustling aren't sourced from anything, meaning that these sounds aren't controlled by any sound sliders.
Potential Fix (tentative):
Simply assigning where this sound is sourced from within this piece of code, where appropriate, should resolve this problem. Another solution would be to call the getSoundSource() method and have this contain the information of where the sound is sourced from.
public class PageButton extends Button { ... public void playDownSound(SoundManager p_99231_) { if (this.playTurnSound) { p_99231_.play(SimpleSoundInstance.forUI(SoundEvents.BOOK_PAGE_TURN, SoundSource.XYZ, XF, XF)); } } ...