The client tries to teleport endermen as well. This can cause particles and teleportation sounds to appear at the wrong position or the enderman might be away for a short moment before its position is re-synchronized.
- Summon an enderman
- Punch it in Creative mode
→ It will disappear for a short moment
Partwise by Howaner
Based on 1.12 decompiled using MCP 9.40 PRE 1
The method net.minecraft.entity.monster.EntityEnderman.teleportRandomly() is called client-side as well which can result in different results since the random number generators are not synchronized. Additionally this method is called when the hurt animation is displayed client-side by dealing 0 unblockable damage to the enderman.
This could be solved by either adding an "is server" check in the method EntityEnderman.teleportRandomly() or maybe even better in the method net.minecraft.entity.monster.EntityEnderman.attackEntityFrom(DamageSource, float).