Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-99897

Invisible WitherBoss with armor disables depth (rendering)

XMLWordPrintable

    • Unconfirmed

      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);
          }
      }
      

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: