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

The sounds of fishing bobbers aren't controlled by the "Players" sound slider

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, 1.14.4, 19w36a, 1.15.2, 1.16.1, 1.16.2 Pre-release 1, 1.16.4, 21w03a, 1.17, 1.17.1, 21w42a, 21w44a, 1.18 Pre-release 1, 1.18 Release Candidate 3, 1.18, 1.18.1, 22w05a, 1.18.2
    • None
    • None
    • Confirmed
    • Sound

    Description

      The Bug:

      The sounds of fishing bobbers aren't controlled by the "Players" sound slider.

      Any action that is created through the player doing something that doesn't result in blocks being changed, is normally controlled by the "Players" sound slider. For example, the sounds of players milking cows, shearing sheep, and throwing tridents, are all controlled by the "Players" sound slider as they should be, because the player is producing these sounds and performing these actions.

      The sounds of retrieving and throwing fishing bobbers aren't controlled by the "Players" sound slider when they should be, and are instead controlled by the "Friendly Creatures" sound slider.

      Steps to Reproduce:

      • Navigate to the "Music & Sounds" settings menu.
      • Turn the "Players" sound slider to "OFF".
      • Turn every other sound slider to "100%".
      • Exit this menu, obtain a fishing rod, use it multiple times, and listen closely as you do this.
      • Take note as to whether or not the sounds of fishing bobbers can be heard, (are controlled by the "Friendly Creatures" sound slider instead of the "Players" sound slider).

      Observed Behavior:

      The sounds of fishing bobbers aren't controlled by the "Players" sound slider and are instead controlled by the "Friendly Creatures" sound slider.

      Expected Behavior:

      The sounds of fishing bobbers would be controlled by the "Players" sound slider. The reason why the sounds of fishing bobbers should be controlled by the "Players" sound slider is that the player is retrieving or throwing the fishing bobbers and is the cause of these sounds being produced, thus should be controlled by the "Players" sound slider.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 1.17.1 using MCP-Reborn.

      net.minecraft.world.item.FishingRodItem.java
               ...
               $$0.playSound((Player)null, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.NEUTRAL, 1.0F, 0.4F / ($$0.getRandom().nextFloat() * 0.4F + 0.8F));
               ...
               $$0.playSound((Player)null, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / ($$0.getRandom().nextFloat() * 0.4F + 0.8F));
               ...

      If we look at the above class, we can see that the sounds of fishing bobbers are sourced from SoundSource.NEUTRAL, otherwise known as the "Friendly Creatures" sound slider.

      Potential Fix:

      Simply changing where the sounds of fishing bobbers are sourced from to SoundSource.PLAYERS should resolve this problem. The correct line of code within its class should look something like the following:

      net.minecraft.world.item.FishingRodItem.java
               ...
               $$0.playSound((Player)null, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.PLAYERS, 1.0F, 0.4F / ($$0.getRandom().nextFloat() * 0.4F + 0.8F));
               ...
               $$0.playSound((Player)null, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / ($$0.getRandom().nextFloat() * 0.4F + 0.8F));
               ...

      Attachments

        1. MC-139041.png
          MC-139041.png
          678 kB
        2. MC-139041.mp4
          2.88 MB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Avoma Avoma
              Votes:
              14 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: