Details
-
Bug
-
Resolution: Fixed
-
Minecraft 1.11.2, Minecraft 17w18b, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 1.13.2, Minecraft 18w43c, Minecraft 19w06a
-
Confirmed
Description
The bug
Mobs look at invisible players or other mobs even if they are not on the same team or the team option seeFriendlyInvisibles is disabled.
How to reproduce
- Summon an invisible villager
/summon villager ~ ~ ~ {ActiveEffects:[{Id:14b,Amplifier:0b,Duration:1200,ShowParticles:0b}]}
- Summon a second villager
- Switch to Spectator mode to make sure they are not looking at you
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The methods net.minecraft.entity.ai.EntityAIWatchClosest.shouldExecute() and net.minecraft.entity.ai.EntityAIWatchClosest.continueExecuting() ignore whether or not the entity is invisible.
Attachments
Issue Links
- relates to
-
MCPE-48846 Entities can still "look" at the player, even though they are invisible.
- Open