Monster infighting

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

Explanation


If a hostile or neutral 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 attacking player or mob dies. If the attacker goes beyond the mob's sight range, this will reset the retaliating behavior and the mob will either return to neutral mode or search for a new target. This mechanic can be useful in Survival multiplayer. One player can attack a mob and run away from it while another player kills it.

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.
 * Endermen can also be aggravated if stared at and the gaze is broken.
 * Witches don't usually fight each other, but when a battle between two witches begins, it does not end without outside interference, because they continually heal themselves with potions of Healing.
 * 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.


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