Monster infighting

Monster infighting is a mechanic in Minecraft where certain mobs will retaliate against other mobs if they are hit by them.

Explanation


If a hostile mob is directly attacked by a player or another mob, the damaged mob will set the damaging mob/player as its enemy and will attack that mob until it dies. This will likely cause the damaging mob to, in turn retaliate against the damaged mob and the two of them will be locked into a duel until one of them dies. This is extremely 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, it will not change its target until that mob or player is dead or out of range. This means that even if another mob or player attacks an infighting mob, the infighting mob will not change its target. If a certain mob refuses to infight with another monster, it is likely because the player already attacked it, so the player was set as the mob's enemy. That mob will not infight with any other mob until the player dies or goes out of tracking range.

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

Some mobs will fight others for reasons other than retaliation.


 * Wolves will attack skeletons, wither skeletons, and sheep unprovoked.
 * Guardians and elder guardians will attack squids.
 * Llamas will attack wolves.
 * Polar bears will attack foxes.
 * Foxes will attack chickens.
 * Trader llamas will attack all mobs that attack their wandering trader.)
 * All types of illagers and zombies will attack all types of Villagers.
 * Ocelots and cats will attack chickens.
 * Piglins will occasionally hunt hoglins.
 * Piglins and wither skeletons attack each other.
 * Withers will attack all mobs except undead mobs and Ghasts.
 * Iron golems will attack most hostile mobs except creepers.
 * Snow golems will attack most hostile mobs.
 * Zoglins will attack most mobs except creepers, ghasts and themselves.
 * Vindicators named "Johnny" or have the  tag set to true will attack most mobs except illagers.

Additionally:


 * Monsters will never retaliate against ghasts.
 * Endermen retaliate, but this rarely happens since they dodge most projectiles.
 * Not all enemies can incite infighting. Zombies, for example, can only ever hit 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.