-
Bug
-
Resolution: Unresolved
-
None
-
1.21.4, 25w06a
-
None
-
Confirmed
-
Mob behaviour
Endermen and zombified piglins that are AngryAt the player, and have a greater than 0 AngerTime, will always attempt to move toward and attack the player upon reloading the chunk they're in, disregarding the distance or gamemode of the player.
This also happens if the mob is forcibly made AngryAt the player with the use of commands.
Other mobs with the AngryAt and AngerTime tags may briefly turn or move toward the targeted player, or have their AngerTime timer stall for a few ticks, but do not otherwise continue to attack the player.
Steps to Reproduce:
- Summon either an enderman or zombified piglin in a singleplayer world. The zombified piglin will be used for my example.
- Do not spawn/keep them in the spawn chunks; it will not work.
- Enter survival mode and attack the zombified piglin.
- Once you have confirmed it trying to attack you, enter creative mode and move around 10 blocks away.
- Leave the world, and rejoin.
Alternatively, instead of leaving the game, leave the area so the chunks unload, and return; or change the values of AngerTime and AngryAt with the use of commands.
Make sure you don't stall too long after step 3; as soon as the mob de-aggros, its AngerTime tag will begin counting down. Finish step 4 before it reaches 0.
Observed Results:
The mob will attempt to attack the player, despite the player being in creative/spectator or too far away.
Expected Results:
The mob would only attempt to attack if the player is both within its detection radius, and in a gamemode that mobs can normally attack.
Screenshots/Videos:
Zombie Piglin attacking creative mode player after relog / chunk reload
Notes:
This can not be reproduced if the mob is within the spawn chunks.
If the player cannot be attacked due to their gamemode, and the mob has either arrived at the player or is unable to move closer, the mob will lose interest and its AngerTime will begin depleting.
I'd predict they'd also move to the player's coordinates should the targeted player be in another dimension, but I have not tested that.