minecraft:behavior.knockback_roar

Allows the mob to perform a damaging knockback that affects all nearby entities.

Properties

PropertyTypeDefaultWhat it does
durationDecimal1The max duration of the roar (in seconds).
attack_timeDecimal0.5The delay after which the knockback occurs (in seconds).
knockback_damageInteger6The damage dealt by the knockback roar.
knockback_horizontal_strengthInteger4The strength of the horizontal knockback.
knockback_vertical_strengthInteger4The strength of the vertical knockback.
knockback_height_capDecimal0.4The maximum height for vertical knockback.
knockback_rangeInteger4The radius (in blocks) of the knockback effect.
cooldown_timeDecimal0.1Time (in seconds) the mob has to wait before using the goal again.
knockback_filtersObject 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.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
damage_filtersObject 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.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
on_roar_endObject{"event": "", "filters": {"AND": null, "NOT": null, "OR":…Event that is triggered when the roar ends.
eventText""
targetTextself, other, player, target, parent, baby, block, damager, holder, item"self"
filtersObject 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.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
priorityIntegermin 00
control_flagsList 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