mojira.dev
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.

Linked issues

Attachments

Comments 4

Going to make the report more generic, I hope you are fine with that

Can confirm for 1.13.2 and 19w06a

Can confirm for 1.14.3: Villagers will still look at nearby invisible villagers.

efraim bring

Jens Bergensten

Confirmed

invisible, looking, mob, player

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

Minecraft 19w08a

Retrieved