minecraft:attack_cooldown for you with a switch.Get GodCraftOverview
minecraft:attack_cooldown is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Adds a pause after the mob attacks before it can look for a new target again.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
attack_cooldown_complete_event | Trigger | none | Event that fires when the pause ends. |
attack_cooldown_time | Range [a, b] | "[0.00, 1.00]" | Length of the pause in seconds, as one number or a random min and max. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:attack_cooldown": {
"attack_cooldown_complete_event": {},
"attack_cooldown_time": "[0.00, 1.00]"
}
}