Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-168016

The sounds of pages in books rustling aren't controlled by any sound sliders

XMLWordPrintable

    • Icon: Bug 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
    • Confirmed
    • Sound

      The Bug:

      The sounds of pages in books rustling aren't controlled by any sound sliders.

      Steps to Reproduce:

      1. Navigate to the "Music & Sounds" settings menu.
      2. Turn the "Master Volume" sound slider to "100%".
      3. Turn every other sound slider to "OFF".
      4. Exit this menu and obtain a book and quill.
      5. Flip between pages in the book and quill and listen closely as you do this.
      6. 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. 

      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));
            }
      
         }
         ...

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: