The bug
An invisible WitherBoss with armor (only half of its maximum health left) disables depth (see screenshot).
How to reproduce
- Use the following command
/summon WitherBoss ~ ~ ~ {Health:0.1f,NoAI:1b,ActiveEffects:[{Id:14,Amplifier:1b,Duration:10000}]}
- Place for example some ArmorStands around the WitherBoss
The reason
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the method net.minecraft.client.renderer.entity.layers.LayerWitherAura.doRenderLayer(EntityWither, float, float, float, float, float, float, float) does not call the method net.minecraft.client.renderer.GlStateManager.depthMask(boolean) with true as argument after rendering.
public void doRenderLayer(EntityWither entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { if (entitylivingbaseIn.isArmored()) { GlStateManager.depthMask(!entitylivingbaseIn.isInvisible()); //... GlStateManager.disableBlend(); // Added this GlStateManager.depthMask(true); } }
- duplicates
-
MC-79697 Entities don't render properly when next to invisible spider, charged creeper, or wither boss with armor
- Resolved