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.

Mob Infighting Behaviors
Not all mobs work the same though. Below is a list of how each mob reacts to being attacked by another.

Other Points of Note

 * 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.

Other Mob vs. Mob Scenarios
Some mobs will fight others for reasons other than retaliation. (There might be some missing here. Feel free to add more.)


 * 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 Zombies and all Illager types. (To protect 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.
 * The Wither 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" will attack most mobs except Illagers. (They will still attack Witches though.)