minecraft:attack_cooldown

Dynamic value

Properties

This component has no properties in the official schema: add it as an empty object {} to switch the behaviour on.

Example from the game files

This is how vanilla Piglin uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:attack_cooldown": {
    "attack_cooldown_time": [
      30.0,
      120.0
    ],
    "attack_cooldown_complete_event": {
      "event": "attack_cooldown_complete_event",
      "target": "self"
    }
  }
}

Used by 4

Vanilla entities with minecraft:attack_cooldown in their definition:

Related components