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

The sounds of camels recovering aren't controlled by the "Friendly Creatures" sound slider

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19.4 Pre-release 1
    • 22w42a, 22w43a, 22w45a, 1.19.3
    • Community Consensus
    • Sound
    • Low
    • Expansion A

      The Bug:

      The sounds of camels recovering (minecraft:entity.camel.dash_ready) aren't controlled by the "Friendly Creatures" sound slider and are instead controlled by the "Players" sound slider. This doesn't make much sense since camels are the ones producing these sounds and not players.

      Any action that is created through a friendly entity doing something that doesn't result in blocks being changed, is normally controlled by the "Friendly Creatures" sound slider. For example, the sounds of pigs oinking, horsing galloping, and rabbits squeaking, are all controlled by the "Friendly Creatures" sound slider as they should be, because the friendly entity is performing these given actions and is the cause of these sounds being produced.

      Steps to Reproduce:

      1. Navigate to the "Music & Sounds" settings menu.
      2. Turn the "Friendly Creatures" sound slider to "OFF".
      3. Turn every other sound slider to "100%".
      4. Exit this menu, summon a camel, and equip a saddle onto it.
      5. Begin riding the camel and make it dash by pressing the space bar.
      6. Listen closely as the camel recovers.
      7. Take note as to whether or not the sounds of camels recovering can be heard, (are controlled by the "Players" sound slider instead of the "Friendly Creatures" sound slider).

      Observed Behavior:

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

      Expected Behavior:

      The sounds of camels recovering would be controlled by the "Friendly Creatures" sound slider.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 22w42a using Mojang mappings.

      net.minecraft.world.entity.animal.camel.Camel.java
      public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddleable {
         ...
         public void tick() {
            super.tick();
            ...
            if (this.dashCooldown > 0) {
               --this.dashCooldown;
               if (this.dashCooldown == 0) {
                  this.level.playSound(null, this.blockPosition(), SoundEvents.CAMEL_DASH_READY, SoundSource.PLAYERS, 1.0f, 1.0f);
               }
            }
            ...

      If we look at the above class, we can see that the sounds of camels recovering are sourced from SoundSource.PLAYERS, otherwise known as the "Players" sound slider.

      Fix:

      Simply changing where the sounds of camels recovering are sourced from to SoundSource.NEUTRAL (the "Friendly Creatures" sound slider) will resolve this problem.

        1. MC-256731.mp4
          7.98 MB
        2. MC-256731.png
          MC-256731.png
          2.38 MB

            elvendorke [Mojang] elvendorke
            Avoma [Mod] Avoma
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: