Mob

Mobs are living, moving game entities.

General Behavior
Generally, mobs are affected by the environment in the same ways as the player: they are subject to physics, and they can be hurt by almost all the same things that harm the player (catching on fire, falling, drowning or suffocating, and of course, being attacked with weapons). However, some types have individual resistances or immunities. For example, Nether mobs are immune to fire, several mobs do not take fall damage, and some have a natural armor rating that protects them against attacks. Mobs can ride minecarts and other mobs, which is a way to move them around for special purposes. When mobs are killed, they drop items which may be useful resources.

Mobs come to exist by spawning in various ways. Players can spawn most mobs by using spawn eggs in creative mode. Most mobs are aware of players within 16 blocks of them, but some can see farther. Their individual abilities are discussed below and on their individual pages.

The term mob is short for mobile and has been used as a general term referring to any moving entities in games since the first MUDs surfaced.

Passive mobs
Passive mobs will never attack the player. The farm animals (chickens, cows, pigs, and sheep), spawn with the landscape, but occasionally spawn on well-lit grass, and can be bred by the player. Horses spawn in plains and savanna biomes, and can be tamed. Mooshrooms spawn and act similarly to cows, but spawn only in mushroom island biomes. Ocelots spawn only in jungle biomes above the Y level of 63, and can also be tamed. Squid need water to spawn in, while bats spawn in darkness similarly to the hostile mobs. Villagers spawn with their village, but only breed on their own initiative when their village population is too low and are willing to breed.

Neutral mobs
Neutral mobs will not attack the player unless provoked. The act of provoking neutral mobs varies. Endermen can be provoked both by hitting them and by looking at their upper torso or head. Zombie pigmen will "call" other zombie pigmen within a 67×67×21 to 111×111×21 area centered on the attacked pigman to attack the player upon hit, and wolves will do the same within a 33×33×21 area (±5% horizontally), both having the ability to see the player through blocks.

Note that spiders and cave spiders will spawn hostile since they spawn in light levels of 7 or lower, but are considered neutral mobs as they become neutral in light levels of 12 or higher, unless hit. In creative mode, neutral mobs act completely passive unless triggered by a mob other the player.

Tamable mobs
These mobs can be tamed by the player, and in the horse's case, ridden as well. The methods of taming these mobs varies between mob.

Hostile mobs
Hostile mobs will attack the player when in range, each with their own abilities. It is worthy to note that most hostile mobs cannot see the player through blocks, and when a player moves behind an obstacle, they will stop chasing the player within a few seconds (with the exception of skeletons, witches, blazes, ghasts and spider variants). However, if the player directly attacks a mob, it will have the ability to see through all blocks and continue chasing the player. Certain mobs (namely zombies, silverfish, Endermites and blazes), upon being hit, also have the ability to "call" other mobs of the same kind in a set area to see and chase the player through walls.
 * Zombies, creepers, skeletons, witches, spiders and spider jockeys require a light level of 7 or less to naturally spawn.
 * Blazes and silverfish require a light level of 11 or less to naturally spawn.
 * Zombie pigmen, ghasts and magma cubes can naturally spawn at any light level.
 * Hostile mobs do not spawn on peaceful difficulty, and will instantly despawn once switched to peaceful.
 * In creative mode, hostile mobs act completely passive unless triggered by a mob other the player.
 * Note that spiders and cave spiders will spawn hostile since they spawn in light levels of 7 or less, but are actually neutral mobs, as they become neutral in light levels of 12 or higher. This includes spiders from spider jockeys.

Utility mobs
Utility mobs are created by and serve the player. Player-created utility mobs will never hurt their creator. However, a naturally spawned iron golem can be provoked by attacking it or nearby villagers. If a player repeatedly attacks villagers, all of that village's golems can become hostile to that player.

Boss mobs
Boss mobs have more complicated attack patterns and movements. Bosses are meant as end game mobs with their high attack strength and health. Wither - created boss mob. When killed, they also drop end game items which can not be legitimately obtained in any other way.

Pocket Edition mobs
The current mobs found in Minecraft Pocket Edition.

Unused mobs
Unused mobs are found in the source code, but are not being used at this time. It is still possible to spawn them with the command, but they will have no AI.

Removed mobs
Removed mobs are no longer in the PC version's game code, and can be found only in certain older versions.

AI
Mobs will ordinarily wander around at random and usually avoid walking off blocks high enough to cause falling damage, though they can be fooled by non-solid blocks such as open trapdoors. In this state, hostile mobs (besides ghasts, Endermen, and zombies) have a search radius of 16 blocks.

Mobs are capable of climbing ladders just as the player is: if they try to move toward a ladder they're touching, they move up it instead. Mobs do not willingly climb ladders, even when aggressive (with the exception of slimes, magma cubes and blazes), and do not see ladders nor do they pathfind up them, so they will not attempt to avoid falling off a ladder should they be on the edge of one. Spiders and cave spiders can climb all blocks as if they were ladders (but only to a limited height).

All mobs except slimes, magma cubes and ghasts will stop wandering within 5 seconds if there is no player within a 32 block radius. In this state, they will glance around randomly, but they won't walk anywhere, although they can still be moved by other means such as flowing water, minecarts, etc. Zombies can walk when there is a villager they can attack even if they are over 32 blocks from a player; similarly, villagers will flee when there is a zombie chasing them.

Most mobs have an advanced pathfinding system that allows them to traverse complex mazes to get to the player. Here is a video showcasing.

Hostile mobs
If the closest player to a wandering hostile mob is within the search radius of 16 blocks and a line of sight can be drawn, the mob will enter pursuit mode. In this mode, will attempt to attack the player, and will find the quickest route to get to the player. Mobs will cease attacking if the player moves out of their vision, but if the player directly hits a mob, it will be able to see the player through blocks. Most mobs will float in water, and whilst in pursuit mode, can pathfind around walls to get to the player. When certain hostile mobs are attacked by another one, it will attack the attacking mob. For example, when a skeleton arrow hits a zombie, the zombie will attack the skeleton. If the mob burns when exposed to daylight, it will seek cover (out of direct sunlight) or water, which will prevent them from burning.

Passive mobs
Passive mobs will not attack the player under any circumstances, rather if damaged directly by the player, they will run around in a random pattern (except squid). This category includes most of the "farm animals" present in the game, which can be bred for food and/or other resources. Also included are bats and squid, both of which have special spawning conditions and cannot be bred. Ocelots are technically passive, in that they will not attack the player, but are actually coded as hostile mobs.

Animals are attracted to both light and grass. If there is a lot of grass nearby, they will wander toward it regardless of light level. If they are completely surrounded by grass, they will wander aimlessly. If they can't see any grass, they will wander toward light. Baby farm animals will follow fully grown farm animals of their species. Passive mobs will flee randomly when attacked. Unlike hostile mobs, most passive mobs (including neutral wolves) will not despawn when the player moves away from them; the exceptions are squid, ocelots, and bats.

Most passive mobs will follow a player who is holding their specific food item: wheat (cows and sheep), carrots/potatoes/beetroots (pigs), or seeds (chickens). As long as the player does not get too far ahead of the mob, they will follow the player over long distances. This can be used to corral mobs into pens. If the food is given to the mob by right clicking the mob, the mob will enter breeding mode (indicated by red heart particles rising off the mob. Horses can also be tamed and bred, but the player must mount the horse and feed it apples before being thrown off (in order to tame).

Neutral mobs
This includes Endermen, zombie pigmen, wolves, and (bright light) spiders and cave spiders. Most of these are discussed under "combat" above, as they are essentially hostile monsters for which the fight can often or usually be avoided.

Wolves merit their own discussion. Much as with zombie pigmen, if a wolf is attacked, all wolves in the area will permanently become hostile to the player and attack them. However, wolves are not as common as zombie pigmen are (in the Nether), as they appear only in Forest and Taiga biomes, and then only in small groups. Accordingly, it's almost trivial to avoid attacking them. Wolves which have not become hostile can be tamed by feeding them bones. While they don't change their appearance as drastically as ocelots do, they effectively become dogs, with a dyeable collar and much higher health. Once tamed, they will fight for the player, targeting any mob that attacks the player (including skeleton arrows), or which the player attacks (not including missiles). Dogs can be healed or bred by feeding them any sort of meat (but not bones).

Issues

 * For issues unique to specific mobs, see that mob's issues section.

Trivia

 * Renaming a mob "Dinnerbone" or "Grumm" using spawn eggs or name tags will flip them upside down.
 * When a mob walks off a block they will sometimes turn around and get back on as if they didn't mean to get off of it, then walk off yet again and continue on their way. This can be useful when trying to get distance between you and a hostile mob (particularly creepers).
 * When mobs die, they emit puffs of white smoke. This gives them the appearance of them turning to dust or vanishing in a puff of smoke.
 * Mobs can be heard up to 16 blocks away. Most hostile mobs can track players up to 16 blocks away. Therefore, if the player hears a hostile mob, it is likely that the mob is aware of the player.
 * Players can approach a hostile mob without being detected if they ensure that there are solid blocks between them and the mob.
 * Players can hide from hostile mob that pursuing the player in 2 blocks tall non-solid block (i.e sugar cane) even if the mob saw the player going in it (this will not work on spiders).
 * After killing a player, or if a player dies while hostile mobs are pursuing the player, the hostile mobs will gather around the player's deathplace, attempting to attack the player. This is because the player has been made invisible and non-solid, but still exists in that position. (evident by the "You Died!" screen still remaining in that position).
 * A player can use this to their advantage by holding a large number of hostile mobs over their deathplace while another player may pass by unnoticed. This quirk can also work against the player in these cases:
 * Ghasts will continue to fire at the player, possibly destroying more blocks or dropped items.
 * If a creeper ignites itself when a player dies, the creeper's fuse will not stop, so it explodes and destroys the player's items.
 * The targeting of the player by hostile mobs is canceled once the player logs out, quits, or respawns.
 * If a hostile mob is tracking a player, the player can separate him or herself and the mob through a wall, relog, and the mob will no longer be tracking the player.
 * Mobs will not walk on top of rails unless pushed on to the rails by another mob. This can be used to trap small amounts of mobs, to create a wall between the player and a mob, or to prevent mobs from interrupting minecarts as they travel down rails.
 * Mobs can be spawned with armor using the command. The armor does not appear on the body of all mobs, but will still work.