mojira.dev
MC-199589

Hitting mobs in Creative mode and then switching into Survival mode 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 then switching into Survival mode causes the mob to attack you.

How To Reproduce:

  1. Spawn any mob (preferably neutral - you also can use hostile mobs for this, but you must be invisible) that can attack you (e.g. an Enderman, Polar Bear or Zombified Piglin)

  2. Hit the mob in creative mode

  3. Quickly switch to survival mode (you cannot take longer than 4 seconds)
    → ❌ The mob begins to pursue the player

Linked issues

Attachments

Comments 18

I tried this and I can confirm that there's a small delay of 5-6 seconds until it doesn't agro you.

Thanks for creating the separate report, I have slightly changed the summary and description. I hope you are alright with that.

The more edits, the better. Thank you for the edits as that can help me with making the best bug reports possible.

Can confirm in 21w03a.

Can confirm in 21w08b. Video attached.

8 more comments

Can confirm in 1.18.2.

This is actually related to my old bug report MC-159532 which was marked as WAI by slicedlime

I'm not sure if the resolution is accurate though. I don't think it's a desirable outcome that when you change from creative to survival the mob attacks you.

This hasn’t been fixed. I can still reproduce it in the latest snapshot.

user-189af

CallMeChris

(Unassigned)

Confirmed

Mob behaviour

1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, ..., 1.21.10, 25w43a, 1.21.11 Release Candidate 1, 1.21.11, 26.1 Snapshot 1

26.1 Snapshot 1

Retrieved