<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AMob_AI</id>
	<title>Minecraft:Mob AI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AMob_AI"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Mob_AI&amp;action=history"/>
	<updated>2026-04-16T13:31:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Mob_AI&amp;diff=90302&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Mob_AI&amp;diff=90302&amp;oldid=prev"/>
		<updated>2026-04-15T11:12:51Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
This article describes the various components of a mob&amp;#039;s AI that control the mob&amp;#039;s behavior.&lt;br /&gt;
&lt;br /&gt;
== Brain ==&lt;br /&gt;
Some mobs use a complex AI system called a brain. A mob&amp;#039;s brain stores memories (data), a list of tasks that can be performed, and a list of sensors used to determine which tasks it can perform.&lt;br /&gt;
&lt;br /&gt;
=== Sensor ===&lt;br /&gt;
Sensors are used to detect if a mob with a brain can perform certain tasks. Examples of sensors include, a sensor to detect if an armadillo should be scared, a sensor to detect the nearest player, and a sensor to detect if a mob is in water.&lt;br /&gt;
&lt;br /&gt;
{|class= &amp;quot;wikitable collapsible&amp;quot;&lt;br /&gt;
|+List of Sensor {{in|JE}}&lt;br /&gt;
! Sensor&lt;br /&gt;
!Class&lt;br /&gt;
!Uses&lt;br /&gt;
|-collapsed&lt;br /&gt;
|dummy&lt;br /&gt;
|DummySensor&lt;br /&gt;
|&amp;#039;&amp;#039;defaulted sensor type&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|nearest_items&lt;br /&gt;
|NearestItemSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Allay}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Piglin}}&lt;br /&gt;
*{{EntityLink|Piglin Brute}}&lt;br /&gt;
*{{EntityLink|Villager}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|nearest_living_entities&lt;br /&gt;
|NearestLivingEntitySensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Allay}}&lt;br /&gt;
*{{EntityLink|Armadillo}}&lt;br /&gt;
*{{EntityLink|Axolotl}}&lt;br /&gt;
*{{EntityLink|Breeze}}&lt;br /&gt;
*{{EntityLink|Camel}}&lt;br /&gt;
*{{EntityLink|Copper Golem}}&lt;br /&gt;
*{{EntityLink|Creaking}}&lt;br /&gt;
*{{EntityLink|Frog}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Happy Ghast}}&lt;br /&gt;
*{{EntityLink|Hoglin}}&lt;br /&gt;
*{{EntityLink|Nautilus}}&lt;br /&gt;
*{{EntityLink|Piglin}}&lt;br /&gt;
*{{EntityLink|Piglin Brute}}&lt;br /&gt;
*{{EntityLink|Sniffer}}&lt;br /&gt;
*{{EntityLink|Tadpole}}&lt;br /&gt;
*{{EntityLink|Villager}}&lt;br /&gt;
*{{EntityLink|Zoglin}}&lt;br /&gt;
*{{EntityLink|Zombie Nautilus}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|nearest_players&lt;br /&gt;
|PlayerSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Allay}}&lt;br /&gt;
*{{EntityLink|Breeze}}&lt;br /&gt;
*{{EntityLink|Creaking}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Happy Ghast}}&lt;br /&gt;
*{{EntityLink|Hoglin}}&lt;br /&gt;
*{{EntityLink|Nautilus}}&lt;br /&gt;
*{{EntityLink|Piglin}}&lt;br /&gt;
*{{EntityLink|Piglin Brute}}&lt;br /&gt;
*{{EntityLink|Sniffer}}&lt;br /&gt;
*{{EntityLink|Tadpole}}&lt;br /&gt;
*{{EntityLink|Villager}}&lt;br /&gt;
*{{EntityLink|Warden}}&lt;br /&gt;
*{{EntityLink|Zoglin}}&lt;br /&gt;
*{{EntityLink|Zombie Nautilus}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|nearest_bed&lt;br /&gt;
|NearestBedSensor&lt;br /&gt;
|{{EntityLink|Villager}}&lt;br /&gt;
|-&lt;br /&gt;
|hurt_by&lt;br /&gt;
|HurtBySensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Allay}}&lt;br /&gt;
*{{EntityLink|Armadillo}}&lt;br /&gt;
*{{EntityLink|Axolotl}}&lt;br /&gt;
*{{EntityLink|Breeze}}&lt;br /&gt;
*{{EntityLink|Camel}}&lt;br /&gt;
*{{EntityLink|Copper Golem}}&lt;br /&gt;
*{{EntityLink|Frog}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Happy Ghast}}&lt;br /&gt;
*{{EntityLink|Nautilus}}&lt;br /&gt;
*{{EntityLink|Piglin}}&lt;br /&gt;
*{{EntityLink|Piglin Brute}}&lt;br /&gt;
*{{EntityLink|Sniffer}}&lt;br /&gt;
*{{EntityLink|Tadpole}}&lt;br /&gt;
*{{EntityLink|Villager}}&lt;br /&gt;
*{{EntityLink|Zombie Nautilus}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|villager_hostiles&lt;br /&gt;
|VillagerHostilesSensor&lt;br /&gt;
|{{EntityLink|Villager}}&lt;br /&gt;
|-&lt;br /&gt;
|villager_babies&lt;br /&gt;
|VillagerBabiesSensor&lt;br /&gt;
|{{EntityLink|Villager}}&lt;br /&gt;
|-&lt;br /&gt;
|secondary_pois&lt;br /&gt;
|SecondaryPoiSensor&lt;br /&gt;
||{{EntityLink|Villager}}&lt;br /&gt;
|-&lt;br /&gt;
|golem_detected&lt;br /&gt;
|GolemSensor&lt;br /&gt;
|{{EntityLink|Villager}}&lt;br /&gt;
|-&lt;br /&gt;
|armadillo_scare_detected&lt;br /&gt;
|MobSensor&lt;br /&gt;
|{{EntityLink|Armadillo}}&lt;br /&gt;
|-&lt;br /&gt;
|piglin_specific_sensor&lt;br /&gt;
|PiglinSpecificSensor&lt;br /&gt;
|{{EntityLink|Piglin}}&lt;br /&gt;
|-&lt;br /&gt;
|piglin_brute_specific_sensor&lt;br /&gt;
|PiglinBruteSpecificSensorregister&lt;br /&gt;
|{{EntityLink|Piglin}}&lt;br /&gt;
|-&lt;br /&gt;
|hoglin_specific_sensor&lt;br /&gt;
|HoglinSpecificSensor&lt;br /&gt;
|{{EntityLink|Hoglin}}&lt;br /&gt;
|-&lt;br /&gt;
|nearest_adult&lt;br /&gt;
|AdultSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Armadillo}}&lt;br /&gt;
*{{EntityLink|Axolotl}}&lt;br /&gt;
*{{EntityLink|Camel}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Hoglin}}&lt;br /&gt;
*{{EntityLink|Nautilus}}&lt;br /&gt;
*{{EntityLink|Zombie Nautilus}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|nearest_adult_any_type&lt;br /&gt;
|AdultSensor&lt;br /&gt;
|{{EntityLink|Happy Ghast}}&lt;br /&gt;
|-&lt;br /&gt;
|axolotl_attackables&lt;br /&gt;
|AxolotlAttackablesSensor&lt;br /&gt;
|{{EntityLink|Axolotl}}&lt;br /&gt;
|-&lt;br /&gt;
|food_temptations&lt;br /&gt;
|TemptingSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Armadillo}}&lt;br /&gt;
*{{EntityLink|Axolotl}}&lt;br /&gt;
*{{EntityLink|Camel}}&lt;br /&gt;
*{{EntityLink|Goat}}&lt;br /&gt;
*{{EntityLink|Happy Ghast}}&lt;br /&gt;
*{{EntityLink|Sniffer}}&lt;br /&gt;
}} &lt;br /&gt;
|-&lt;br /&gt;
|frog_temptations&lt;br /&gt;
|TemptingSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Frog}}&lt;br /&gt;
*{{EntityLink|Tadpole}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|nautilus_temptations&lt;br /&gt;
|TemptingSensor&lt;br /&gt;
|{{Flatlist|&lt;br /&gt;
*{{EntityLink|Nautilus}}&lt;br /&gt;
*{{EntityLink|Zombie Nautilus}}&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
|frog_attackables&lt;br /&gt;
|FrogAttackablesSensor&lt;br /&gt;
|{{EntityLink|Frog}}&lt;br /&gt;
|-&lt;br /&gt;
|is_in_water&lt;br /&gt;
|IsInWaterSensor&lt;br /&gt;
|{{EntityLink|Frog}}&lt;br /&gt;
|-&lt;br /&gt;
|warden_entity_sensor&lt;br /&gt;
|WardenEntitySensor&lt;br /&gt;
|{{EntityLink|Warden}}&lt;br /&gt;
|-&lt;br /&gt;
|breeze_attack_entity_sensor&lt;br /&gt;
|BreezeAttackEntitySensor&lt;br /&gt;
|{{EntityLink|Breeze}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sensor classes====&lt;br /&gt;
{{Expand section}}&lt;br /&gt;
{|class= &amp;quot;wikitable collapsible&amp;quot;&lt;br /&gt;
!Class!! Memory requires!!Do tick&lt;br /&gt;
|-&lt;br /&gt;
|DummySensor&lt;br /&gt;
|&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;Nothing&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|NearestItemSensor&lt;br /&gt;
|{{cd|nearest_visible_wanted_item}}&lt;br /&gt;
|Find the {{Tooltip|nearest|with euclidean distance}} item that:&lt;br /&gt;
* It is to a [[Minecraft:euclidean distance]] of up to 32 blocks from the mob.&lt;br /&gt;
* On the y-axis, it is 16 blocks away from the mob&amp;#039;s hitbox.&lt;br /&gt;
* It is in mob line of sight{{fn|grup=sensor|name=los|It is possible to draw a straight line from the mob&amp;#039;s eye to the target without intersecting a block [[Minecraft:collision box]].}}.&lt;br /&gt;
* The mob wants to pick up it.{{fn|grup=sensor|name=dm|It depends on the mob, defined independently of the sensor.}}&lt;br /&gt;
And save this item in the memory {{cd|nearest_visible_wanted_item}}.&lt;br /&gt;
|-&lt;br /&gt;
|NearestLivingEntitySensor&lt;br /&gt;
|{{cd|mobs}} and {{cd|visible_mobs}}&lt;br /&gt;
|Lists all other [[Minecraft:living entities]] that are alive and within a cobuoid generated by the mob&amp;#039;s [[Minecraft:Hitbox#Entity hitboxes|hitbox]] incremented by mob&amp;#039;s {{attr|follow_range}} in all directions. Sort list by [[Minecraft:euclidean distance]] and add to memory {{cd|mobs}}.&lt;br /&gt;
&lt;br /&gt;
In {{cd|visible_mobs}} save the entities of {{cd|mobs}} that{{fn|rup=sensor|Technically, in memory {{cd|mob_visibel}} a list equal to that of {{cd|mob}} is saved, along with a binary list of the same size that indicates whether the entity passes the test or not.}}:&lt;br /&gt;
* They are not a [[Minecraft:Spectator]] player, or an invisible or marker [[Minecraft:armor stand]],&lt;br /&gt;
* They are in mob line of sight{{fn|grup=sensor|name=los}},&lt;br /&gt;
* And they are within a range of {{cd|r}} blocks of the mob, where {{cd|r}} is the {{attr|follow_range}} of the mob{{fn|grup=sensor|name=vp| For entities that are not in mob&amp;#039;s memory {{cd|attack_target}}, this range is multiplied by a modifier that indicates the visibility percentage of the entity. The modifier starting with 1 and cumulatively:&lt;br /&gt;
* Multiplying by {{cd|0.8}} if it is a [[Minecraft:sneaking]] player,&lt;br /&gt;
* Multiplying by {{cd|0.07}} if it is [[Minecraft:invisible]] and without equipament in {{tooltip|humanoid armor slot|head, chest, legs or feet slot}},&lt;br /&gt;
* Multiplying by {{cd|0.175p}} if it is invisible and has {{cd|p&amp;amp;ge;1}} equipaments in humanoid armor slot,&lt;br /&gt;
* Multiplying by {{cd|0.5}} if it is using the corresponding mob [[Minecraft:head]] in the {{cd|head}} slot (for [[Minecraft:skeleton]], [[Minecraft:zombie]], [[Minecraft:piglin]], [[Minecraft:piglin brute]], and [[Minecraft:creeper]])&lt;br /&gt;
The final range must be at least 2.}}. &lt;br /&gt;
|-&lt;br /&gt;
|PlayerSensor&lt;br /&gt;
|{{cd|nearest_players}}, {{cd|nearest_visible_player}}, {{cd|nearest_visible_targetable_player}} and {{cd|nearest_visible_targetable_players}}&lt;br /&gt;
|List all non-spectator players to a [[Minecraft:euclidean distance]] up to mob&amp;#039;s {{attr|follow_range}} fro the mobs, sort by euclidean distance and save in {{cd|nearest_players}} memory.&lt;br /&gt;
&lt;br /&gt;
From this list, it filters the players who are in the mob&amp;#039;s line of sight{{fn|name=los}} and within follow range{{fn|name=vp}}. If it exists, save the first player from the list in memory {{cd|earest_visible_player}}.&lt;br /&gt;
&lt;br /&gt;
In memory {{cd|nearest_visible_targetable_players}} saves this last list with the following filters:&lt;br /&gt;
* If the difficulty is [[Minecraft:peaceful]], remove all players.&lt;br /&gt;
* Remove all players from [[Minecraft:creative mode]].&lt;br /&gt;
* Remove all players from the same [[Minecraft:team]] from the mob.&lt;br /&gt;
* If the mob is the [[Minecraft:allay]], remove the linked player.&lt;br /&gt;
* If the mob is a [[Minecraft:illager]], {{cd|minecraft:player}} is in the tag {{Tag link|entity_type|illager_friends}}, and neither the mob nor the player is on a team, remove the player.&lt;br /&gt;
* If the mob is a [[Minecraft:tamed]] animal, remove their owner and the players on the owner&amp;#039;s team.&lt;br /&gt;
If the end list is not empty, save in memory {{cd|nearest_visible_targetable_player}} the first player on a list.&lt;br /&gt;
|-&lt;br /&gt;
|NearestBedSensor&lt;br /&gt;
|{{cd|nearest_bed}}&lt;br /&gt;
|If the mob is baby:&lt;br /&gt;
* Set the auxiliary variables {{cd|triedCount {{=}} 0}} and {{cd|lastUpdate {{=}} GameTime + RandomInt(20)}}{{fn|grup=Sensor|name=rInt|{{cd|RandomInt(x)}} is a random integer {{cd|n}} such that {{cd|0 &amp;amp;le; n &amp;lt; x}}.}}, where {{cd|GameTime}} is the total number of [[Minecraft:Tick#Game_tick|game ticks]] that have elapsed in the world.&lt;br /&gt;
* In the {{cd|batchCache}} [[Minecraft:w:Cache_(computing)|cache]], it attempts to save [[Minecraft:POI]]s of type {{cd|home}} that are up to 48 blocks from the mob at an euclid distance. For each POI found whose position {{cd|Pos}} is not in the cache, it increases {{cd|triedCount}} by 1, if {{cd|triedCount &amp;lt; 5}}, it saves {{cd|(Pos, lastUpdate + 40)}} in the cache. In this way, it saves up to 5 new beds in the {{cd|batchCache}}. The POIs added to the cache create a new set {{cd|pois}}, with the position and type of each POI.&lt;br /&gt;
* Try creating a path to one of the POI in {{cd|pois}}. If it find a path, that path can reach and the target is a POI, save the target&amp;#039;s position in mob&amp;#039;s memory {{cd|nearest_bed}}.&lt;br /&gt;
* If the path cannot be found, or the path cannot be reach, and {{cd|triedCount &amp;lt; 5}}, remove from the {{cd|batchcache}} the values where the second coordinate is less than {{cd|lastUpdate}}.&lt;br /&gt;
|-&lt;br /&gt;
|HurtBySensor&lt;br /&gt;
|{{cd|huty_by}} and {{cd|hurt_by_entity}}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|VillagerHostilesSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|VillagerBabiesSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SecondaryPoiSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|GolemSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MobSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PiglinSpecificSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PiglinBruteSpecificSensorregister&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HoglinSpecificSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AdultSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AxolotlAttackablesSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TemptingSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FrogAttackablesSensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|IsInWaterSensor&lt;br /&gt;
|{{cd|is_in_water}}&lt;br /&gt;
|If the mob is touching the water, add the memory {{cd|is_in_water}}, otherwise remove the memory.&lt;br /&gt;
|-&lt;br /&gt;
|WardenEntitySensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BreezeAttackEntitySensor&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{{fnlist|grup=sen}}&lt;br /&gt;
&lt;br /&gt;
=== Task ===&lt;br /&gt;
Tasks are activities that mobs with brain AI systems can perform. Sensors are used to determine if a task can be performed, and tasks may use information stored in memories. Examples of tasks include a villager walking to its jobsite, a piglin admiring an item, or a warden emerging. Tasks have priorities, so tasks with a higher priority will over run tasks with lower priority, for example, if a zombie is wandering and  it sees a player, it will switch tasks to attacking.&lt;br /&gt;
&lt;br /&gt;
=== Memory ===&lt;br /&gt;
Memories are used to store data, and are used when mobs perform tasks. Examples of memories include a list of all visible mobs in range, the location of a villager&amp;#039;s jobsite block, and any cooldowns the mob may have.&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
=== Walking ===&lt;br /&gt;
{{main|#Pathfinding on land}}&lt;br /&gt;
&lt;br /&gt;
Mobs movement on land varies wheter it&amp;#039;s hostile or passive. Hostile mobs will try to approach and attack the player when within their detection range, while most passive mobs will attempt to run away when attacked. Some mobs will also try to [[Minecraft:Mob infighting|attack]] or [[Minecraft:Mob fleeing|run away]] from certain blocks or mobs.&lt;br /&gt;
&lt;br /&gt;
=== Swimming ===&lt;br /&gt;
{{main|#Pathfinding in water}}&lt;br /&gt;
&lt;br /&gt;
Mobs swimming works the same way as walking, but in water. While most mobs will just float on water or sink, some can properly swim like [[Minecraft:fish]], [[Minecraft:drowned]], [[Minecraft:dolphin]]s, [[Minecraft:turtle]]s, [[Minecraft:guardian]]s and [[Minecraft:elder guardian]]s.&lt;br /&gt;
&lt;br /&gt;
=== Flying ===&lt;br /&gt;
{{main|#Pathfinding in air}}&lt;br /&gt;
&lt;br /&gt;
Mobs flying works the same way as walking, but in air. Most mobs will just fall when suspended in air, with a few exceptions. Mobs with [[Minecraft:Slow Falling]], [[Minecraft:levitation]] and the [[Minecraft:chicken]] don&amp;#039;t fly normally but are able to float in mid-air. [[Minecraft::Category:Flying mobs]] contains a list of all mobs that can pathfind in air.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
Goals are a simple AI system used primarily by mobs already existed before the brain AI. However, there are recent mobs that use both AIs simultaneously, for example, the [[Minecraft:happy ghast]].&lt;br /&gt;
  &lt;br /&gt;
Goals can range from wandering around, opening doors, attacking another mob, and more. Each type of mob that uses goals has its own defined list of goals, and each goal has a priority. Mobs attempt to perform the lowest priority goal they can, and may switch goals if there is an opportunity to pursue a lower priority goal. For example, if a zombie is targeting and chasing a villager (priority of 3) and a player comes within the detection range of the zombie, the zombie may target and chase the player (priority of 2) instead.&lt;br /&gt;
&lt;br /&gt;
=== List of goals ===&lt;br /&gt;
List of goals that are used by many different mobs.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable collapsible collapsed&amp;quot;&lt;br /&gt;
|+List of Goals&lt;br /&gt;
!Goal !! Description !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|Active Target&lt;br /&gt;
|Select an entity to target for chasing and attacking&lt;br /&gt;
|-&lt;br /&gt;
|Ambient Stand&lt;br /&gt;
|Untamed horse bucks when player tries to ride it&lt;br /&gt;
|-&lt;br /&gt;
|Attack&lt;br /&gt;
|Attack target&lt;br /&gt;
|-&lt;br /&gt;
|Attack with Owner&lt;br /&gt;
|Tamed animal attacks a target mob attacked by owner&lt;br /&gt;
|-&lt;br /&gt;
|Avoid Sunlight&lt;br /&gt;
|During day, move out of direct line-of-sight with sky&lt;br /&gt;
|-&lt;br /&gt;
|Bow Attack&lt;br /&gt;
|Attack target with bow&lt;br /&gt;
|-&lt;br /&gt;
|Breathe Air&lt;br /&gt;
|Mob that can drown tries to move out of water&lt;br /&gt;
|-&lt;br /&gt;
|Cat Sit on Block&lt;br /&gt;
|Cat sits on bed, chest, or furnace&lt;br /&gt;
|-&lt;br /&gt;
|Chase Boat&lt;br /&gt;
|Chase after boat ridden by player&lt;br /&gt;
|&amp;#039;&amp;#039;Unused&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|Creeper Ignite&lt;br /&gt;
|Creeper ignites&lt;br /&gt;
|-&lt;br /&gt;
|Crossbow Attack&lt;br /&gt;
|Attack target with crossbow&lt;br /&gt;
|-&lt;br /&gt;
|Destroy Egg&lt;br /&gt;
|Destroy turtle eggs&lt;br /&gt;
|-&lt;br /&gt;
|Disableable Follow Target&lt;br /&gt;
|Raid entity stops following target&lt;br /&gt;
|&amp;#039;&amp;#039;Unused&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|Dive Jump&lt;br /&gt;
|Mob jumps up and dives down&lt;br /&gt;
|-&lt;br /&gt;
|Dolphin Jump&lt;br /&gt;
|Dolphin jumps out of water&lt;br /&gt;
|-&lt;br /&gt;
|Door Interact&lt;br /&gt;
|Mob tries to open a door&lt;br /&gt;
|-&lt;br /&gt;
|Eat Grass&lt;br /&gt;
|Mob grazes on grass&lt;br /&gt;
|-&lt;br /&gt;
|Escape Danger&lt;br /&gt;
|Mob panics and runs away when damaged&lt;br /&gt;
|-&lt;br /&gt;
|Flee Entity&lt;br /&gt;
|Mob runs away from another mob that it is scared of (e.g. skeletons running from wolves)&lt;br /&gt;
|-&lt;br /&gt;
|Fly&lt;br /&gt;
|Mob tries to fly&lt;br /&gt;
|-&lt;br /&gt;
|Follow Group Leader&lt;br /&gt;
|Fish tries to follow the leader of a school of fish&lt;br /&gt;
|-&lt;br /&gt;
|Follow Mob&lt;br /&gt;
|Mob follows another mob&lt;br /&gt;
|-&lt;br /&gt;
|Follow Owner&lt;br /&gt;
|Tamed mob follows owner&lt;br /&gt;
|-&lt;br /&gt;
|Follow Parent&lt;br /&gt;
|Baby mob follows its parent&lt;br /&gt;
|-&lt;br /&gt;
|Form Caravan&lt;br /&gt;
|Llama follows other llamas to form a caravan | up to 8 llamas in caravan&lt;br /&gt;
|-&lt;br /&gt;
|Go to Bed and Sleep&lt;br /&gt;
|Tamed cat sleeps in bed&lt;br /&gt;
|-&lt;br /&gt;
|Go to Walk Target&lt;br /&gt;
|Mob walks to a target&lt;br /&gt;
|-&lt;br /&gt;
|Hold in Hands&lt;br /&gt;
|Mob holds an item in its main hand&lt;br /&gt;
|-&lt;br /&gt;
|Horse Bond with Player&lt;br /&gt;
|Horse attempts to bond with player attempting to tame it&lt;br /&gt;
|-&lt;br /&gt;
|Iron Golem Look&lt;br /&gt;
|Iron golem looks at a villager&lt;br /&gt;
|-&lt;br /&gt;
|Iron Golem Wander Around&lt;br /&gt;
|Iron golem wanders around village&lt;br /&gt;
|uses points of interest&lt;br /&gt;
|-&lt;br /&gt;
|Long Door Interact&lt;br /&gt;
|Open a door, then close it after a delay&lt;br /&gt;
|-&lt;br /&gt;
|Look Around&lt;br /&gt;
|Mob spins around and looks in random directions&lt;br /&gt;
|-&lt;br /&gt;
|Look At Customer&lt;br /&gt;
|Villager or wandering trader looks at player while trading&lt;br /&gt;
|-&lt;br /&gt;
|Look At Entity&lt;br /&gt;
|Mob looks at another mob&lt;br /&gt;
|-&lt;br /&gt;
|Melee Attack&lt;br /&gt;
|Mob paths to target and attacks&lt;br /&gt;
|-&lt;br /&gt;
|Move Into Water&lt;br /&gt;
|Mob paths to water&lt;br /&gt;
|-&lt;br /&gt;
|Move Through Village&lt;br /&gt;
|Mob moves between points of interest in a village&lt;br /&gt;
|-&lt;br /&gt;
|Move To Raid Center&lt;br /&gt;
|Raiders move toward village after spawning&lt;br /&gt;
|-&lt;br /&gt;
|Move To Target Position&lt;br /&gt;
|Mob paths to a specific block&lt;br /&gt;
|-&lt;br /&gt;
|Pounce At Target&lt;br /&gt;
|Mob jumps towards target&lt;br /&gt;
|cats, foxes, ocelots&lt;br /&gt;
|-&lt;br /&gt;
|Powder Snow Jump&lt;br /&gt;
|Mob dives into powder snow&lt;br /&gt;
|foxes&lt;br /&gt;
|-&lt;br /&gt;
|Prioritized Goal&lt;br /&gt;
|Used to override the default priority of a goal&lt;br /&gt;
|-&lt;br /&gt;
|Projectile Attack&lt;br /&gt;
|Mob attacks target with a projectile&lt;br /&gt;
|arrow, spit, trident, potion, snow ball, wither skull, &amp;#039;&amp;#039;not fireballs&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|Raid Goal&lt;br /&gt;
|Raiders target villagers&lt;br /&gt;
|-&lt;br /&gt;
|Revenge&lt;br /&gt;
|Target entity that attacked the mob&lt;br /&gt;
|-&lt;br /&gt;
|Wander Around&lt;br /&gt;
|Move to a nearby random position&lt;br /&gt;
|-&lt;br /&gt;
|Wander Around Far&lt;br /&gt;
|Move to a random position, sometimes farther away than Wander Around goal&lt;br /&gt;
|-&lt;br /&gt;
|Zombie Attack&lt;br /&gt;
|Attack goal for zombies and zombie variants&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Lists of mob goals ===&lt;br /&gt;
Lists of goals and associated priorities for individual mobs.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable collapsible&amp;quot;&lt;br /&gt;
|+Zombie&lt;br /&gt;
!Goal !! Priority !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|Revenge || 1 || Attack entity that damaged the zombie&lt;br /&gt;
|-&lt;br /&gt;
|Active Target - Player || 2 || Target the player&lt;br /&gt;
|-&lt;br /&gt;
|Zombie Attack || 2 || Attack current target&lt;br /&gt;
|-&lt;br /&gt;
|Active Target - Iron Golem || 3 || Target Iron Golem&lt;br /&gt;
|-&lt;br /&gt;
|Active Target - Merchant || 3 || Target Villager or Wandering Trader&lt;br /&gt;
|-&lt;br /&gt;
|Destroy Egg || 4 || Break turtle eggs&lt;br /&gt;
|-&lt;br /&gt;
|Active Target - Turtle || 5 || Target baby turtle&lt;br /&gt;
|-&lt;br /&gt;
|Wander Around Far || 7 ||&lt;br /&gt;
|-&lt;br /&gt;
|Look Around || 8 ||Looks away from Entities&lt;br /&gt;
|-&lt;br /&gt;
|Look at Entity || 8 ||Looks at nearest Entities&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Pathfinding ==&lt;br /&gt;
=== Pathfinding penalties ===&lt;br /&gt;
[[File:Zombified piglin pathing 1.png|thumb|[[Zombified piglin]] starts pathfinding to a [[Minecraft:turtle egg]]]]&lt;br /&gt;
[[File:Zombified_pigling_pathing_2.png|thumb|Due to pathfinding penalties, the zombified piglin takes an indirect path to the turtle egg, pathing through [[wither rose]]s and taking damage, instead of pathing through the lava or magma blocks, which do not damage the zombified piglin]]&lt;br /&gt;
&lt;br /&gt;
When pathfinding to a target, mobs will sometimes avoid certain blocks (usually blocks that cause damage or slow the mob down). These blocks have a penalty associated with them. Generally, mobs try to path through blocks with the smallest penalty. There are some blocks that most mobs cannot path through; these all have a penalty of -1.&lt;br /&gt;
&lt;br /&gt;
The following table is a list of all pathfinding penalties and their default values. Each type of pathfinding (land, water, air) uses its own subset of these penalties. Some mobs override these default values.&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!Penalty type !! Penalty !! Description&lt;br /&gt;
|-&lt;br /&gt;
|blocked || -1 || can&amp;#039;t pathfind through block (most full solid blocks)&lt;br /&gt;
|-&lt;br /&gt;
|powder snow || -1 || {{BlockLink|powder snow}}&lt;br /&gt;
|-&lt;br /&gt;
|fence || -1 || {{BlockLink|fences}}&amp;lt;br&amp;gt;{{BlockLink|walls}}&amp;lt;br&amp;gt;{{BlockLink|fence gates}} (closed)&lt;br /&gt;
|-&lt;br /&gt;
|lava || -1 || {{BlockLink|lava}}&lt;br /&gt;
|-&lt;br /&gt;
|unpassable rail || -1 || {{BlockLink|rail}}&lt;br /&gt;
|-&lt;br /&gt;
|damage - other || -1 || {{BlockLink|cactus}}&amp;lt;br&amp;gt;{{BlockLink|sweet berry bush}}&lt;br /&gt;
|-&lt;br /&gt;
|closed wood door || -1 || {{BlockLink|oak door|wood door}}&lt;br /&gt;
|-&lt;br /&gt;
|closed iron door || -1 || {{BlockLink|iron door}}&lt;br /&gt;
|-&lt;br /&gt;
|open || 0 || {{BlockLink|air}}&amp;lt;br&amp;gt;{{BlockLink|cave air}}&amp;lt;br&amp;gt;{{BlockLink|void air}}&lt;br /&gt;
|-&lt;br /&gt;
|walkable || 0 || {{BlockLink|TNT}} with pressure plate on top (under the mob)&lt;br /&gt;
|-&lt;br /&gt;
|walkable door || 0 || a door the mob can open&lt;br /&gt;
|-&lt;br /&gt;
|trapdoor || 0 || {{BlockLink|trapdoors}}&amp;lt;br&amp;gt;{{BlockLink|lily pad}}&amp;lt;br&amp;gt;{{BlockLink|big dripleaf}}&lt;br /&gt;
|-&lt;br /&gt;
|danger - powder snow || 0 || neighboring block is {{BlockLink|powder snow}}&lt;br /&gt;
|-&lt;br /&gt;
|open door || 0 || open wood or iron door&lt;br /&gt;
|-&lt;br /&gt;
|cocoa || 0 ||{{BlockLink|cocoa}}&lt;br /&gt;
|-&lt;br /&gt;
|damage - cautious || 0 || {{BlockLink|wither rose}}&amp;lt;br&amp;gt;{{BlockLink|pointed dripstone}}&lt;br /&gt;
|-&lt;br /&gt;
|danger - trapdoor || 0 || neighboring block is {{BlockLink|trapdoor}}&lt;br /&gt;
|-&lt;br /&gt;
|breach water || 4 || there is an air block above a water block&lt;br /&gt;
|-&lt;br /&gt;
|water || 8 || {{BlockLink|water}}&lt;br /&gt;
|-&lt;br /&gt;
|water border || 8 || neighboring block is {{BlockLink|water}}&lt;br /&gt;
|-&lt;br /&gt;
|danger - fire || 8 || neighboring block is:&amp;lt;br&amp;gt;{{BlockLink|fire}}&amp;lt;br&amp;gt;{{BlockLink|lava}}&amp;lt;br&amp;gt;{{BlockLink|magma block}}&amp;lt;br&amp;gt;{{BlockLink|campfire|lit campfire}}&amp;lt;br&amp;gt;{{BlockLink|lava cauldron}}&lt;br /&gt;
|-&lt;br /&gt;
|danger - other || 8 || neighboring block is: &amp;lt;br&amp;gt;{{BlockLink|cactus}}&amp;lt;br&amp;gt;{{BlockLink|sweet berry bush}}&lt;br /&gt;
|-&lt;br /&gt;
|honey || 8 || {{BlockLink|honey block}}&lt;br /&gt;
|-&lt;br /&gt;
|damage - fire || 16 || {{BlockLink|fire}}&amp;lt;br&amp;gt;{{BlockLink|lava}}&amp;lt;br&amp;gt;{{BlockLink|magma block}}&amp;lt;br&amp;gt;{{BlockLink|campfire|lit campfire}}&amp;lt;br&amp;gt;{{BlockLink|lava cauldron}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Mob pathfinding penalty overrides&lt;br /&gt;
The following mobs override the default pathfinding penalty for some blocks:&lt;br /&gt;
{|class=&amp;quot;wikitable collapsible collapsed&amp;quot;&lt;br /&gt;
!Mob !! Penalty Type !! Penalty&lt;br /&gt;
|-&lt;br /&gt;
|{{EntityLink|axolotl}} || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|bee}} || damage - fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || water || -1&lt;br /&gt;
|-&lt;br /&gt;
| || cocoa || -1&lt;br /&gt;
|-&lt;br /&gt;
| || fence || -1&lt;br /&gt;
|-&lt;br /&gt;
| || water border || 16&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|chicken}} || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|fox}} || danger - other || 0&lt;br /&gt;
|-&lt;br /&gt;
| || damage - other || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|frog}} || trapdoor || -1&lt;br /&gt;
|-&lt;br /&gt;
| || water || 4&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|goat}} || powder snow || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - powder snow || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|villager}}&amp;lt;br&amp;gt;{{EntityLink|wandering trader}} || damage-fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire || 16&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|parrot}} || danger-fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || damage - fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || cocoa || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|sniffer}} || water || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - powder snow || -1&lt;br /&gt;
|-&lt;br /&gt;
| || damage - cautious || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|strider}} || water || -1&lt;br /&gt;
|-&lt;br /&gt;
| || lava || 0&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire || 0&lt;br /&gt;
|-&lt;br /&gt;
| || damage - fire || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|turtle}} || close iron door || -1&lt;br /&gt;
|-&lt;br /&gt;
| || closed wood door || -1&lt;br /&gt;
|-&lt;br /&gt;
| || open door || -1&lt;br /&gt;
|-&lt;br /&gt;
| || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|wolf}} || powder snow || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - powder snow || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink| piglin}}&amp;lt;br&amp;gt;{{EntityLink|piglin brute}} || damage - fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire || 16&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|blaze}} || water || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire || 8&lt;br /&gt;
|-&lt;br /&gt;
| || damage - fire || 8&lt;br /&gt;
|-&lt;br /&gt;
| || lava || 8&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|breeze}} || danger - trapdoor || -1&lt;br /&gt;
|-&lt;br /&gt;
| || damage - fire || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|drowned}} || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|enderman}} || water || -1&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|guardian}} || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|ravager}} || leaves || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|warden}} || unpassable rail || 0&lt;br /&gt;
|-&lt;br /&gt;
| || damage - fire || 0&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire || 0&lt;br /&gt;
|-&lt;br /&gt;
| || damage - other || 8&lt;br /&gt;
|-&lt;br /&gt;
| || powder snow || 8&lt;br /&gt;
|-&lt;br /&gt;
| || lava || 8&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|water creatures || water || 0&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|wither skeleton}} || lava || 8&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|{{EntityLink|zombified piglin}} || lava || 8&lt;br /&gt;
|- style=&amp;quot;border-top: solid&amp;quot;&lt;br /&gt;
|animal || damage - fire || -1&lt;br /&gt;
|-&lt;br /&gt;
| || danger - fire&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pathfinding on land ===&lt;br /&gt;
&lt;br /&gt;
* All entities Move based off of random targets that are generated every tick with a priority toward their entity specific goals.&lt;br /&gt;
* These targets can be located anywhere in 3D space within the entity range and are only every generated when wandering or when they have no goals. &lt;br /&gt;
* For every target a path is generated; with the entity preferring the path with the lowest score regarding the Pathfinding penalties.&lt;br /&gt;
* If an entity cannot take any paths with a low enough score, or any paths without a score of -1 the entity will not move until one is found.&lt;br /&gt;
* If an entity&amp;#039;s target is located inside a block (including water), the target is moved to the nearest air block above it.&lt;br /&gt;
&lt;br /&gt;
This means, every entitiy when wandering will always prefer to pathfind to a block with the most blocks below it within range.&lt;br /&gt;
&lt;br /&gt;
Due to the higher chance that a target will be generated within the blocks below it and moved up to the nearest air block above before generating a path.&lt;br /&gt;
&lt;br /&gt;
=== Pathfinding in water ===&lt;br /&gt;
&lt;br /&gt;
* Pathfinding in water is roughly the same as land, however, most entities, excluding fish and drowned, will bounce on the surface preferring land due to the Pathfinding penalties of water.&lt;br /&gt;
&lt;br /&gt;
=== Pathfinding in air ===&lt;br /&gt;
&lt;br /&gt;
* Pathfinding in air is roughly the same as land, however, there are few entities that can pathfind to air.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Minecraft:Mob infighting]]&lt;br /&gt;
&lt;br /&gt;
==Navigation==&lt;br /&gt;
{{Navbox Java Edition technical|general}}&lt;br /&gt;
&lt;br /&gt;
[[Minecraft:de:Künstliche Intelligenz]]&lt;br /&gt;
[[Minecraft:ja:Mob AI]]&lt;br /&gt;
[[Minecraft:pt:IA de criatura]]&lt;br /&gt;
[[Minecraft:zh:生物AI]]&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>