Mobs look at invisible players or other mobs even if they are not on the same team or the team option seeFriendlyInvisibles is disabled.
- Summon an invisible villager
- Summon a second villager
- Switch to Spectator mode to make sure they are not looking at you
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.