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 @unknown 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. 🙂
net.minecraft.client.gui.screens.inventory.PageButton.java
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.
net.minecraft.client.gui.screens.inventory.PageButton.java
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));
}
}
...
Attachments
Comments 6
Can confirm this in 1.18 Pre-release 1. Here are some extra details regarding this problem.
The Bug:
Book and quill page rustling sounds 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 "0%".
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 book and quill page rustling sounds are controlled by any sound sliders.
Observed Behavior:
Book and quill page rustling sounds aren't controlled by any sound sliders.
Expected Behavior:
Book and quill page rustling sounds would be controlled by a sound slider.
This ticket relates to MC-248356.
I can confirm for 1.16.2 it isn't tied to any sound slider except Master Volume