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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 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, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.4, 23w51b, 1.20.6, 1.21, 1.21.3
    • Confirmed
    • Sound
    • Low
    • Platform

      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:

      1. Navigate to the "Music & Sounds" settings menu.
      2. Turn the "Players" sound slider to "OFF".
      3. Turn every other sound slider to "100%".
      4. Exit this menu, obtain a fishing rod, use it multiple times, and listen closely as you do this.
      5. 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));
               ...

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

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            21 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              CHK: