If you summon a group of some mobs and attack them under certain circumstances, they will continue to attack the player even when they change gamemodes which entities should not be hostile to.
Steps to Reproduce:
(Start test in creative mode)
Apply invisibility effect:
/effect give @p minecraft:invisibility infinite 255 true
Summon 10 or more of the affected mobs (noted in 'notes' section)
Attack one of the affected mobs (drowned must have tridents)
Enter survival mode, and quickly move onto the next within a second
Change gamemode to creative/spectator
Observed Behavior:
One or possibly more of the pillagers will continue to attack the player, even if you switch to spectator, and then creative again. It will stop attacking after you switch back to survival, and then creative again.
Expected Behavior:
The entities would not attack the player in creative or spectator at all, and would lose aggression as soon as the player enters those gamemodes.
Videos & Screenshots
[media]made by @unknown
Notes:
The following mobs are known to be affected:
'Illager' mobs (evokers, pillagers, vindicators, and illusioners)
Ravagers
Witches
Wolves
Bees when harvesting from their nest / hive
Zombie mobs (zombies, drowned, husks, zombie Villagers
Hoglins & Zoglins
Creaking
Linked issues
is duplicated by 112
relates to 6
Attachments
Comments 31
This happens for me as well, and being targeted by the pillagers is also when performance starts to drop, so possibly related to MC-157697.
This seems to affect all illagers and zombies; see MC-159867. I added them to this ticket.
Not only can these mobs attack you in creative mode after provoking a group of them, they can also attack you from an infinite distance and through dimensions. This not only allows illagers and zombies to look at you and follow you from an infinite distance and through dimensions, it also allows evokers to send vexes towards you from any point. This glitch is MC-147574, but I think it is the same bug as this one.
Requesting ownership of this issue, as the original poster has not added any affected versions, or updated the issue at all in almost 4 years.
As per MC-267476's report, add Vex to the list as well
For me I was attacked in spectator mode after throwing a chicken egg at one of the pillagers in survival. The rest of the pillagers died by that guy.