minecraft:ambient_sound_interval for you with a switch.Get GodCraftOverview
minecraft:ambient_sound_interval is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Controls how often the entity plays its idle sound, like a cow mooing now and then.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
event_name | String | "ambient" | The sound event used as the idle sound. |
event_names | Array | none | A list of sounds with conditions. The first one whose condition passes is played, otherwise event_name is used. |
range | Decimal | "16.000000" | Up to this many extra random seconds are added to the wait, so the sound does not repeat on a fixed beat. |
value | Decimal | "8.000000" | The shortest wait in seconds between two idle sounds. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:ambient_sound_interval": {
"event_name": "ambient",
"event_names": {},
"range": "16.000000",
"value": "8.000000"
}
}