minecraft:behavior.panic

Allows a mob to panic when receiving damage, making it run around and away from the damage source that made it enter this state.

Properties

PropertyTypeDefaultWhat it does
speed_multiplierDecimal1Movement speed multiplier when using this goal.
ignore_mob_damageBooleanfalseIf true, the mob will not panic in response to damage from other mobs. This overrides the damage types in "damage_sources".
prefer_waterBooleanfalseIf true, the mob will prefer water over land.
forceBooleanfalseIf true, the mob will stop panicking only when it can no longer find positions to run away to, or when the goal is removed.
damage_sourcesList of text[]The list of damage sources that will cause this mob to panic.
panic_soundTextitem.use.on, hit, step, step.baby, fly, jump, jump.prevent, break, place, heavy.step, gallop, fall, hurt, hurt.baby, hurt.in.water, death, death.baby, death.in.water, death.to.zombie, ambient, ambient.baby, ambient.in.water, ambient.in.air, ambient.tame …"undefined"Sound to play while the mob is panicking.
sound_intervalObject{"max": 0, "min": 0}Range of random ticks to wait between playing the panic sound.
minDecimal0
maxDecimal0
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

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

{
  "minecraft:behavior.panic": {
    "priority": 1,
    "speed_multiplier": 1.25,
    "damage_sources": [
      "campfire",
      "fire",
      "fire_tick",
      "freezing",
      "lightning",
      "lava",
      "magma",
      "temperature",
      "soul_campfire"
    ],
    "ignore_mob_damage": true
  }
}

Used by 37

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

Related components