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

"Fox teleports" sound plays for both Players and Friendly Creatures sound categories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w44a
    • 1.19.2, 22w45a, 1.19.3
    • Confirmed
    • Sound
    • Low
    • Gameplay

      The Bug

      When a fox teleports using a chorus fruit, the sound will play if the Players or the Friendly Creatures sound category is on.

      To Reproduce

      1. Turn off all sound categories except for Players.
      2. Spawn a fox and make it eat chorus fruit, or use the command /summon fox ~ ~ ~ {HandItems:[ {Count:1b,id:"chorus_fruit"}

        ]}

      3.  Wait until the fox teleports, and observe the fox making the sound
      4. Repeat, but with the Friendly Creatures sound category being the only one turned on.

      Solution

      ChorusFruitItem calls both level.playSound and livingEntity.playSound. level.playSound calls it exclusively using SoundSource.PLAYERS. Remove this line, or do something else with it.

            Unassigned Unassigned
            CrowdingFaun624 CrowdingFaun624
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: