Monster infighting

Monster infighting is a mechanic in Minecraft in which certain mobs retaliate against other mobs who hit them.

Explanation


If a hostile mob is directly attacked by a player or another mob, the damaged mob stops attacking its current target and attacks the mob or player that damaged it. This causes the mob that did the damage to retaliate in turn, and the two of them become locked into a duel until one of them dies. This is useful in combat as it distracts two monsters temporarily, kills one of them, and severely weakens the other.

Once a mob has taken damage from a mob or player, that mob or player is set as the mob's permanent target. This means that even if another mob or player attacks an infighting mob, the infighting mob does not stop trying to attack its permanent target. If a certain mob refuses to infight with another monster, it is likely because the player or a mob already attacked it, so the player or a mob was set as the mob's permanent target. That mob does not infight with any other mob until the player or mob dies or goes out of tracking range. This mechanic can be useful in Survival multiplayer. One player can attack a mob and run away from it while another player kills it. Because a player or a mob already attacked the mob, it never retaliates against another player or mob.

Retaliation
Not all mobs have the same infighting behavior. Below is a list of how each mob reacts to being attacked by another.


 * Notes
 * Endermen retaliate, but this rarely happens since they dodge most projectiles. This most commonly happens during the end fight if they are damaged by the ender dragon.
 * Not all enemies can incite infighting. Zombies, for example, can hit only the player or mob they are currently targeting, so the only way to provoke them into infighting is to get another monster to hit them. For this reason, it is impossible to get two zombies to fight each other.
 * Breaking gold, opening a chest, or failing to wear gold armor near a piglin causes the piglin to set the player as its permanent target. This means that a piglin does not infight with other mobs once it becomes angry at the player, even if the player never directly attacks the piglin.
 * Drowned work similarly to zombies. However, a drowned with a trident can hit another when targeting the player, resulting in infighting.

Hunting
Some mobs fight others for other reasons than retaliation, such as hunting and fighting natural enemies.


 * Wolves attack skeletons, skeleton horsemans, spider jockeys, wither skeletons, sheep, and foxes unprovoked.
 * Guardians and elder guardians attack squid.
 * Llamas attack wolves.
 * Polar bears attack foxes.
 * Foxes attack chickens and chicken jockeys.
 * Trader llamas attack any mob that attacks their wandering trader.
 * All types of illagers and zombies (with one exception) attack all types of villagers.
 * Ocelots attack chickens.
 * Cats attack rabbits.
 * Endermen attack endermites.
 * Piglins occasionally hunt hoglins.
 * Piglins and wither skeletons attack each other.
 * Wither Skeletons attack baby turtles, iron golems, snow golems, piglins, and piglin brutes
 * Withers attack all mobs except undead mobs and ghasts.
 * Iron golems attack most hostile mobs
 * Snow golems attack most hostile mobs.
 * Zoglins attack most mobs except creepers, ghasts and themselves.
 * Vindicators named "Johnny" or have the  tag set to true attack most mobs except illagers.
 * Axolotls attack drowned, all types of fish and squid, guardians, and elder guardians.
 * Undead mobs (with two exception) attack baby turtles.
 * Zombie variants and blazes attack turtle eggs.