Mojira Archive
MC-96946

Enderman keep follow player in creative mode

The bug

If you aggro an enderman in survival mode, then switch to creative mode, it continues to teleport behind you.

How to reproduce

  1. Look at an enderman in survival mode
  2. Switch to creative mode
  3. The enderman stops attacking you
  4. Walk away from the enderman
    → Notice the enderman continues to teleport behind or near you (without attacking you) even if you try to run away from it

Notes: It continues it even if you switch to spectator mode or back to survival.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

It looks like the problem is that the task net.minecraft.entity.monster.EntityEnderman.AIFindPlayer is not reset when the player switched to creative or spectator mode.