Mojira Archive
MC-116969

Mobs look at invisible mobs / players

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

  1. Summon an invisible villager
    /summon villager ~ ~ ~ {ActiveEffects:[{Id:14b,Amplifier:0b,Duration:1200,ShowParticles:0b}]}
    
  2. Summon a second villager
  3. 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.

Fixed

efraim bring

[Mojang] Jeb (Jens Bergensten)

2017-05-03, 09:26 PM

2020-06-12, 08:40 PM

2019-02-20, 02:54 PM

3

2

Confirmed

invisible, looking, mob, player

Minecraft 1.11.2 - Minecraft 19w06aMinecraft 1.11.2, Minecraft 17w18b, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 1.13.2, Minecraft 18w43c, Minecraft 19w06a

Minecraft 19w08a