minecraft:heartbeat for you with a switch.Get GodCraftOverview
minecraft:heartbeat is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Plays a heartbeat sound on a repeating timer, like the warden.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
interval | Molang | "1.00" | Molang expression giving seconds between beats; 0 or less turns the heartbeat off. |
sound_event | String | "heartbeat" | Sound played for each beat. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:heartbeat": {
"interval": "1.00",
"sound_event": "heartbeat"
}
}