minecraft:behavior.knockback_roar
Allows the mob to perform a damaging knockback that affects all nearby entities.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
duration | Decimal | 1 | The max duration of the roar (in seconds). |
attack_time | Decimal | 0.5 | The delay after which the knockback occurs (in seconds). |
knockback_damage | Integer | 6 | The damage dealt by the knockback roar. |
knockback_horizontal_strength | Integer | 4 | The strength of the horizontal knockback. |
knockback_vertical_strength | Integer | 4 | The strength of the vertical knockback. |
knockback_height_cap | Decimal | 0.4 | The maximum height for vertical knockback. |
knockback_range | Integer | 4 | The radius (in blocks) of the knockback effect. |
cooldown_time | Decimal | 0.1 | Time (in seconds) the mob has to wait before using the goal again. |
knockback_filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | The list of conditions another entity must meet to be a valid target to apply knockback to. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
damage_filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | The list of conditions another entity must meet to be a valid target to apply damage to. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
on_roar_end | Object | {"event": "", "filters": {"AND": null, "NOT": null, "OR":… | Event that is triggered when the roar ends. |
event | Text | "" | |
target | Textself, other, player, target, parent, baby, block, damager, holder, item | "self" | |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Ravager uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.knockback_roar": {
"priority": 1,
"duration": 1,
"attack_time": 0.5,
"knockback_damage": 6,
"knockback_horizontal_strength": 3,
"knockback_vertical_strength": 3,
"knockback_range": 4,
"knockback_filters": {
"test": "is_family",
"subject": "other",
"operator": "!=",
"value": "ravager"
},
"damage_filters": {
"test": "is_family",
"subject": "other",
"operator": "!=",
"value": "illager"
},
"on_roar_end": {
"event": "minecraft:end_roar"
},
"cooldown_time": 0.1
}
}Used by 1
Vanilla entities with minecraft:behavior.knockback_roar in their definition:
Related components
behavior.nearest_attackable_targetbehavior.melee_box_attackbehavior.ranged_attackbehavior.stomp_turtle_eggbehavior.leap_at_targetbehavior.nearest_prioritized_attackable_targetbehavior.aquatic_charge_attackbehavior.charge_held_itembehavior.guardian_attackbehavior.ocelotattackbehavior.slime_attackbehavior.charge_attackbehavior.delayed_attackbehavior.dragonchargeplayerbehavior.dragonflamingbehavior.dragonstrafeplayerbehavior.fire_at_targetbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.send_eventbehavior.sonic_boombehavior.stomp_attackbehavior.summon_entity