Skip to content

Weighted Sound Event

Data Type.

Either a Identifier that defines the sound event or an Object which defines a sound event with volume and pitch alongside weight.

Fields:

Field Type Default Description
sound Sound Event With Volume and Pitch The namespace and ID of the sound to play along with pitch and volume.
sounds Array of Sound Event With Volume and Pitch The namespace and ID of the sounds to play along with pitch and volume.
weight Integer 1 The weight for the sound effect to play in a randomiser. The higher this is, the more likely it'll be selected.

Examples:

"sound": "minecraft:entity.pig.hurt"
A minecraft:entity.pig.hurt sound event.

{
    "sound": "minecraft:entity.pig.death",
    "weight": 5
}

This weighted sound event has a weight of 5 and will play the minecraft:entity.pig.death sound event if selected.