When I was attacking zombie pigmen with a snowball and switched to creative using the gamemode switcher then zombie pigman was fine for 3 seconds but then started attacking
What I expected to happen was.
it would not attack in creative
What actually happened was
it tried to attack me in creative
Steps to Reproduce:
1. Put a step by step guide on how to trigger the bug here
2. grab a snowball and spawn 4 zombie pigmen then switch to survival hit them with the snowball walk back 5 blocks switch to creative hid behind a tree for 3 seconds then pop out.
3. They should be angry and have swords raised and follow you even thought they cannot attack
dupe of MC-146524