The minecraft:play_sound
action plays a sound event at a player or position in the world.
If this
player is not present, it will fall back to playing the sound from the specified position.
This action is always successful.
Name | Description | Type | Default Value |
---|---|---|---|
position | The position to target. | An action context parameter | |
sound | The sound event to play. | A sound event | |
category | The category to play the sound in. | A sound category | |
volume | The volume to use for the sound. The actual volume is picked randomly between the minimum and maximum. | A float range | |
pitch | The pitch to use for the sound. The actual pitch is picked randomly between the minimum and maximum. | A float range | |
from_entity | Whether to play the sound event from this player, rather than the position. | An optional boolean | false |
{ "type": "minecraft:play_sound", "position": "this", "sound": "minecraft:item.bottle.fill", "category": "neutral", "volume": 1.0, "pitch": 1.0 }