1. Wiki
  2. /Entities
  3. /minecraft:attack_cooldown

minecraft:attack_cooldown

Don't want to write this by hand? GodCraft sets minecraft:attack_cooldown for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
attack_cooldown_complete_eventTriggernoneEvent that fires when the pause ends.
attack_cooldown_timeRange [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]"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more