Skip to main content

Play sound

saturn:play_sound

Plays the given sound event at the entity.

Runs an operation on a single entity. Used in entity action fields such as entity_action and a trigger rule's action; action arrays run in order.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:play_sound
soundResource IDyes—SoundEvent ID.
categoryEnum stringnoomittedSound category. Available values: master, music, records, weather, blocks, hostile, neutral, players, ambient, voice, ui.
volumeNumberno1.0Volume multiplier.
pitchNumberno1.0Pitch angle in degrees when not following the mouse.

JSON example​

{
"type": "saturn:play_sound",
"sound": "minecraft:entity.experience_orb.pickup",
"category": "players"
}

This is a value to embed in the corresponding field, not a standalone loadable data pack file. The example: references in the examples must be replaced with defined entries.

Java entry point​

com.iafenvoy.saturn.data.action.builtin.entity.PlaySoundAction. This page is based on the Codec in the current 26.1.2 source.