"Fox teleports" sound plays for both Players and Friendly Creatures sound categories
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
- Turn off all sound categories except for Players.
- Spawn a fox and make it eat chorus fruit, or use the command /summon fox ~ ~ ~ {HandItems:[
{Count:1b,id:"chorus_fruit"}
]}
- Wait until the fox teleports, and observe the fox making the sound
- 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.
Created Issue:
"Fox teleports" sound plays for both Players and Friendly Creatures sound categories
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
- Turn off all sound categories except for Players.
- Spawn a fox and make it eat chorus fruit, or use the command /summon fox ~ ~ ~ {HandItems:[ {Count:1b,id:"chorus_fruit"}
]}
- Wait until the fox teleports, and observe the fox making the sound
- 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.
Removed Category: (Unassigned)
Added Mojang Priority:
Low
Added Labels: chorus_fruit fox
Added Affects Versions: 1.19.2
Added Affects Versions: 1.19.3
This bug was fixed in 23w44a.