I'm not quite able to reproduce it intentionally/controlled.
Steps to Reproduce:
Be in Creative
Have zombies around you while you hover less than a block over the ground
Observed Results:
A zombie turns towards you and once it is in range, the arms move as if it was attacking the player.
Expected Results:
The zombie stays passive and ignores you.
Notes:
While I was flying around during the night, I was killing the mobs around me, and I would go idle for a few seconds and a nearby zombie would turn towards me and attack. It doesn't push you or actually hurt you if you change to survival afterwards. Right after it hits you it returns to being passive as normal. I could not get a picture because it does not always happen. (nearby the area was 4 zombie spawners and lots of heads as well. It was the mountains biome. I do not know if that might of caused it or not) It is only a minor bug and does not severely impact gameplay.
Linked issues
Comments 2
I know this is 4 years later but this is due to you attacking a "zombie leader". It is a type of zombie that has a chance of spawning depending on regional difficulty on hard mode and can spawn "reinforcement zombies" to help attack. Either way, the reinforcement zombie is not supposed to target the player in creative mode so this is a valid bug.
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-146524, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord