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
| Property | Type | Default | What it does |
|---|---|---|---|
speed_multiplier | Decimal | 1 | Movement speed multiplier when using this goal. |
ignore_mob_damage | Boolean | false | If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in "damage_sources". |
prefer_water | Boolean | false | If true, the mob will prefer water over land. |
force | Boolean | false | If 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_sources | List of text | [] | The list of damage sources that will cause this mob to panic. |
panic_sound | Textitem.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_interval | Object | {"max": 0, "min": 0} | Range of random ticks to wait between playing the panic sound. |
min | Decimal | 0 | |
max | Decimal | 0 | |
priority | Integermin 0 | 0 | |
control_flags | List 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: