The bug
When a player, while wearing no armor, affected with the Invisibility effect, hostile mobs will still target and attack the player as normal.
In /gamemode survival
the following mobs will attack the player:
Unprovoked: Guardians, Elder Guardians, Blazes, Ghasts, Wither Bosses, Phantom, Shulkers
Provoked (hit): Creepers, Skeletons, Zombies, Spiders, Cave Spiders, Silverfish, Endermites, Endermen (not when looked at, but when hit), Zombie Pigmen, Wither Skeletons, Shulkers (stops attacking after a bit)
Ignore you even when provoked: Slimes and Magma Cubes
Have even seen some mobs, under some circumstances trying to attack while in /gamemode creative
or /gamemode spectator
, while affected with the Invisibility effect. However not always.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 10
relates to 4
Attachments
Comments 32
I think this is intended? I mean sure it makes no sense why it would be but it just is, I could be wrong though.
still present in 15w42a
I believe intended behavior is for provoked mobs to track you as normal, the being able to see you regardless of potion effect seems like the bug portion of this report.
Hoglins are covered by MC-172479.
I think the bug has been fixed at some point.
It is intentional that mobs can sometimes see invisible players up to a distance of 3.5 metres (or even further if the player is wearing armor).
It is intentional that mobs (except slimes) who are attacked by invisible players can see their attacker and fight back.
Many players thinking a return of MC-89309
can confirm bug exists in 15w39c on OSX 10.10 java 1.8