Skip to content

Play Sound

Entity Action Type

Plays a sound event at the position of the entity.

Type ID: eggolib:play_sound

Note

The value of the volume field is used to multiply the base distance of the sound event, which is 16 blocks.

Fields

Field Type Default Description
sound Identifier The identifier of the sound event to play.
category Sound Category optional If specified, use this sound category instead of the sound category defined in the entity.
volume Float 1.0 The volume of the sound event.
pitch Float 1.0 The pitch of the sound event.

Examples

"entity_action": {
    "type": "eggolib:play_sound",
    "sound": "minecraft:entity.creeper.ignite",
    "category": "hostile"
}

This example will play the minecraft:entity.creeper.ignite sound event in the hostile sound category.