The information on this page is up-to-date to Minecraft Java Edition version 1.21.10.
Aggro (also known as threat, hatred, and enmity) is what determines the target of each mob in a game. More complex games tend to have mobs that track the threat level of each player they can target, and attacking the one with the highest threat. However, Minecraft’s enmity system is a lot more simplistic.
Minecraft does not exactly have an enmity system for mobs. Mobs instead select their target according to a priority list based on their target’s behavior. This behavior is mostly uniform across most common mobs, but there are a few groups of mobs which behave differently.
The behaviors here are not individual systems attached to the mobs, but rather they are targeting strategies that the mobs use and these categories are simply bundling together mobs who have generally similar, if not identical, strategies.
Revenge lock-on then nearest lock-on
This is the most common lock-on behavior that nearly every classic mob has. It appears in skeletons and their variations, spiders and cave spiders, zombies and variations including zombie villagers, pillagers, vindicators, evokers, illusioners and ravagers, blazes, endermites, silverfish and shulkers. The aggro is as follows:
Some mobs still behave as described above but with slight alterations. They are as follows:
Some mobs, when attacked, alert its nearby allies (usually mobs of the same time). This alerting is only effective on mobs that don’t already have a target, be it for revenge or the nearest mob. This group revenge mechanics applies for the following mobs:
A couple of classic mobs do not seek out to hurt those who have hurt them, and instead will lock on to the nearest target, and will only change when they die. This behavior is presented by ghasts, guardians and elder guardians, slimes and magma cubes, creepers. The aggro rule is as follows:
Creepers additionally have a lock-on revenge mechanic. This is intended for creepers to attack skeletons who have hit them. If you hit the creeper and then it gets shot by a skeleton, you’ll have triggered its revenge mechanic for you and will never target the skeleton.
Slimes and Magma Cubes do not inherit the original target when splitting.
This behavior appears only on neutral classic mobs. Effectively, if they are hurt, they will hunt down whoever hit them until they are dead. Present only on endermen and zombie pigmen. More precisely:
Additionally, both endermen and zombie pigmen, after their target dies, will search a nearby player if the universal anger gamerule is enabled.
The mobs in the Nether Update (1.16) have a new system compared to older mobs. What this entails in practice is that they do not hyperfixate on one target as hard. Piglins, piglin brutes, hoglins and zoglins are the only mobs that demonstrate this kind of behavior. The exact rules are as follows:
This differs from classic mobs in that they can switch targets freely instead of having to kill its target. Two sufficiently skilled players can juggle the attention of one of those mobs without neither of them getting hurt.
I haven’t figured out how the phantom targets exactly but. From what I could gather, it’s jank, and all the rules are as follows:
This causes the phantom to always target the player that joined the server the earliest, because internally they come first. This means that, there is no determinate way to distract a phantom other than running away from it. The only way to distract a phantom is for a player to approach who’s been online for longer than the player targeted by the phantom.
If you have joined the server later than them, you cannot tank phantom attacks for them.
These mobs use the system added in 1.16. I did not test them thoroughly since I’m not interested in boss fights, but it seems, from a very quick glance, that rules are as follows:
I would expect it that these newer mobs do not lock-on very tightly onto one target and can switch targets.
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT