minecraft:behavior.ocelotattack

Controls specific attack behavior for Ocelots.

Properties

PropertyTypeDefaultWhat it does
cooldown_timeDecimal1Time (in seconds) between attacks.
x_max_rotationDecimal30Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target.
y_max_head_rotationDecimal30Maximum rotation (in degrees), on the Y-axis, this entity's head can rotate while trying to look at the target.
max_distanceDecimal15Max distance from the target, this entity will use this attack behavior.
max_sneak_rangeDecimal15Max distance from the target, this entity starts sneaking.
max_sprint_rangeDecimal4Max distance from the target, this entity starts sprinting (sprinting takes priority over sneaking).
reach_multiplierDecimal2Used with the base size of the entity to determine minimum target-distance before trying to deal attack damage.
sneak_speed_multiplierDecimal0.6Modifies the attacking entity's movement speed while sneaking.
sprint_speed_multiplierDecimal1.33Modifies the attacking entity's movement speed while sprinting.
walk_speed_multiplierDecimal0.8Modifies the attacking entity's movement speed when not sneaking or sprinting, but still within attack range.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

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

{
  "minecraft:behavior.ocelotattack": {
    "priority": 4,
    "cooldown_time": 1.0,
    "x_max_rotation": 30.0,
    "y_max_head_rotation": 30.0,
    "max_distance": 15.0,
    "max_sneak_range": 15.0,
    "max_sprint_range": 4.0,
    "reach_multiplier": 2.0,
    "sneak_speed_multiplier": 0.6,
    "sprint_speed_multiplier": 1.33,
    "walk_speed_multiplier": 0.8
  }
}

Used by 2

Vanilla entities with minecraft:behavior.ocelotattack in their definition:

Related components