mojira.dev
MC-99897

Invisible WitherBoss with armor disables depth (rendering)

The bug

An invisible WitherBoss with armor (only half of its maximum health left) disables depth (see screenshot).

How to reproduce

  1. Use the following command

    /summon WitherBoss ~ ~ ~ {Health:0.1f,NoAI:1b,ActiveEffects:[{Id:14,Amplifier:1b,Duration:10000}]}
  2. 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);
    }
}

Related issues

Attachments

Comments

migrated
[media]
migrated

same issue as MC-79697

marcono1234

(Unassigned)

Unconfirmed

depth, invisible, rendering, wither

Minecraft 1.9.1 Pre-Release 3

Retrieved