public void updateFog() {
      Level var1 = this.minecraft.level;
      Player var2 = this.minecraft.player;
      GL11.glFog(2918, this.createBuffer(this.fogRed, this.fogBlue, this.fogGreen, 1.0F));
      GL11.glNormal3f(0.0F, -1.0F, 0.0F);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      Block var5;
      if((var5 = Block.blocks[var1.getTile((int)var2.x, (int)(var2.y + 0.12F), (int)var2.z)]) != null && var5.getLiquidType() != LiquidType.NOT_LIQUID) {
         LiquidType var6 = var5.getLiquidType();
         GL11.glFogi(2917, 2048);
         float var3;
         float var4;
         float var7;
         float var8;
         if(var6 == LiquidType.WATER) {
            GL11.glFogf(2914, 0.1F);
            var7 = 0.4F;
            var8 = 0.4F;
            var3 = 0.9F;
            if(this.minecraft.settings.anaglyph) {
               var4 = (var7 * 30.0F + var8 * 59.0F + var3 * 11.0F) / 100.0F;
               var8 = (var7 * 30.0F + var8 * 70.0F) / 100.0F;
               var3 = (var7 * 30.0F + var3 * 70.0F) / 100.0F;
               var7 = var4;
               var8 = var8;
               var3 = var3;
            }

            GL11.glLightModel(2899, this.createBuffer(var7, var8, var3, 1.0F));
         } else if(var6 == LiquidType.LAVA) {
            GL11.glFogf(2914, 2.0F);
            var7 = 0.4F;
            var8 = 0.3F;
            var3 = 0.3F;
            if(this.minecraft.settings.anaglyph) {
               var4 = (var7 * 30.0F + var8 * 59.0F + var3 * 11.0F) / 100.0F;
               var8 = (var7 * 30.0F + var8 * 70.0F) / 100.0F;
               var3 = (var7 * 30.0F + var3 * 70.0F) / 100.0F;
               var7 = var4;
               var8 = var8;
               var3 = var3;
            }

            GL11.glLightModel(2899, this.createBuffer(var7, var8, var3, 1.0F));
         }
      } else {
         GL11.glFogi(2917, 9729);
         GL11.glFogf(2915, 0.0F);
         GL11.glFogf(2916, this.fogEnd);
         GL11.glLightModel(2899, this.createBuffer(1.0F, 1.0F, 1.0F, 1.0F));
      }

      GL11.glEnable(2903);
      GL11.glColorMaterial(1028, 4608);
   }