The bug
Invisible mobs or players taking damage are rendered opaque and in the wrong order (you can see for example the back of the head in front of the front while looking at the front) if you are in Spectator mode or if you are in the same team and the option seeFriendlyInvisibles
is set to true
.
How to reproduce
Summon an invisible mob which is taking damage
/summon husk ~ ~ ~ {NoAI:1b,ActiveEffects:[{Id:14b,Amplifier:1b,Duration:1200,ShowParticles:0b},{Id:6b,Amplifier:1b,Duration:1200,ShowParticles:0b},{Id:11b,Amplifier:10b,Duration:1200,ShowParticles:0b}]}
Switch to spectator mode and look at the mob
Can confirm for MC 1.12.1.