Plays a specified sound to a player or in a location, and at a specific volume and pitch.
playsound <sound> (<targets>|<pos>) [<volume>] [<pitch>] [<maxDistance>]
<sound> String
<sound>
Specifies the sound to play. Should be the filename of a sound (minus the extension), basically the same thing used for minetest.sound_play
minetest.sound_play
<targets> Selector
<targets>
Specifies the entities at whose position the sound will play.
<pos> Position
<pos>
Specifies the position to play the sounds from.
<volume> Number
<volume>
Specifies the value by which the volume will be multiplied. 1 is normal, 0.5 is half, 2 is double.
<pitch> Number
<pitch>
Specifies the value by which the pitch will be multiplied. 1 is normal, 0.5 is an octave down, 2 is an octave up.
<maxDistance> Number
<maxDistance>
The maximum distance from <pos> or <targets> at which the sound can still be heard.
To play the sound of TNT igniting 3 nodes behind the nearest player:
/execute as @p at @s run playsound tnt_ignite ^ ^ ^-3
v1.0
Added /playsound
/playsound
Last updated 1 year ago