mojira.dev
MC-145367

scheduling a function containing the playsound command plays no sound

Create a function that contains a playsound command, such as;

playsound minecraft:entity.experience_orb.pickup master @a ~ ~ ~

this will play the sound of an XP orb being picked up, on the master slider to every player.

 

When the function is ran using the /function command it plays as expected, but if the function is scheduled using /schedule the function triggers but the sound fails to play.

Comments 2

All scheduled functions run at world spawn. The sound is too far away to be heard

I'd, incorrectly, assumed that @a ~ ~ ~ would still play the sound relative to the target. Using "execute at @a" has the desired result.

Matt Parkes

(Unassigned)

Unconfirmed

Minecraft 19w09a

Retrieved