Mob fleeing

This article is a work in progress.
 
Please help expand and improve it. The talk page may contain suggestions.

In Minecraft, mob fleeing is a mechanic in which mobs will attempt to avoid or "flee" from sources that they are fearful of.

Overview

When a mob is in close enough proximity to something that it is fearful of (referred to as a "fear source" in this article), it attempts to move away from that source (usually through moving quickly such as sprinting) until it is a reasonable distance away.

All mobs will check for fear sources in the surrounding area every 5 ticks when there is a line of sight. The radius in which a mob detects a fear source can vary depending on the specific fear source in Java Edition or simply 3×3×3 for every mob in Bedrock Edition.[1] For example: a mob may detect a certain fear source within a radius of 8 blocks, whereas it may detect a different fear source within a larger radius of 15 blocks.

When fleeing, a mob moves to a location 4-15 blocks away from the feared source and then return to its regular behavior.

Usually, fleeing from a fear source becomes a mob’s top priority, meaning it will stop whatever action it was doing in favor of fleeing. As such, fleeing can interrupt mobs from doing many actions such as interacting or attacking. In most cases, the mob will return to what it was previously doing when it is no longer fleeing.

A mob's fear source can be in the form of a block, another mob, or a player.

Fleeing interactions

Mob Fear Source Details
Bogged
Skeleton
Stray
Wither Skeleton[Java Edition only]
Wolf Skeletons, strays, and bogged flee from a wolf until they are attacked, after which they begin retaliating against the wolf. Wither skeletons alternate between fleeing and retaliating against the wolf.
Cat
Ocelot
Player Stray cats and untrusting ocelots avoid being near and flee from players.
Cave Spider
Spider
Armadillo Spiders and cave spiders will only flee from armadillos which are not rolled up in their shell.
Cod
Pufferfish
Salmon
Tropical Fish
Player
Creeper Cat
Ocelot
Dolphin Elder Guardian
Guardian
Evoker Player
Creaking
Fox Player
Polar Bear
Wolf
Foxes flee from players that they are not trusting towards.
Hoglin Player
Piglin
Nether Portal
Respawn Anchor
Warped Fungus
Hoglins flee from piglins when outnumbered during a hunt.
Baby hoglins flee when attacked by a player.
Illusioner[JE only]
Pillager
Ravager
Vindicator
Creaking A vindicator that is named "Johnny" alternates between fleeing from the creaking and attempting to attack it.
Panda (Worried) Player
Most monsters[JE only]
All non-panda mobs‌[BE only]
In Java Edition, worried pandas flee from most monsters except ghasts, hoglins, magma cubes, phantoms, shulkers, slimes, and the ender dragon.
In Bedrock Edition, worried pandas flee from all non-panda mobs.
Phantom Cat
Ocelot[BE only]
Piglin Hoglin
Wither
Wither Skeleton

Zoglin
Zombified Piglin
Soul Campfire (lit)
Soul Fire
Soul Lantern
Soul Torch

Piglins flee from hoglins when outnumbered during a hunt.
Only baby piglins flee from wither skeletons and withers.
Piglins only flee from lit soul campfires.
Rabbit (except Killer Bunny‌[JE only]) Player
Wolf
Most monsters
In Java Edition, rabbits flee from most monsters except ghasts, hoglins, magma cubes, phantoms, shulkers, slimes, and the ender dragon.
In Bedrock Edition, rabbits flee from all monsters except hoglins and the ender dragon.
Villager Drowned
Evoker
Husk
Illusioner[JE only]
Pillager
Ravager
Vex
Vindicator
Zoglin
Zombie
Zombie Villager
Wandering Trader Drowned
Evoker
Husk
Illusioner[JE only]
Pillager
Ravager
Vex
Vindicator
Zoglin
Zombie
Zombie Villager
Zombified Piglin[BE only]
Wolf Llama
Trader Llama
How easily the wolf is deterred is determined by the llama's/trader llama's strength.

See also

References

  1. MCPE-182041 — behavior.avoid_mob_type not respecting max_dist and max_flee

Navigation