Mojira Archive
MC-199589

Hitting mobs in Creative then switching into Survival causes the mob to target you

The bug

Hitting a mob (which is by default passive; or which does not see you because you are invisible) in Creative mode and switching shortly afterwards into Survival mode makes the mob attack you.

How to reproduce

  1. Spawn a mob (preferably passive, you also can use hostile mobs for this, but you must be invisible), e.g. an Enderman, Polar Bear or Zombified Piglin
  2. Hit the mob in creative mode
  3. Quickly switch to survival mode (must be 4 seconds or less)
    The mob begins to pursue the player