Package net.minecraft.util

Examples of net.minecraft.util.Icon


      red = anaglyphRed;
      green = anaglyphGreen;
      blue = anaglyphBlue;
    }

    Icon iconGlass, iconStreaks, iconSide, iconOverlaySouth, iconOverlayWest;

    if (renderer.hasOverrideBlockTexture())
    {
      iconGlass = iconStreaks = iconSide =
      iconOverlaySouth = iconOverlayWest =
          renderer.overrideBlockTexture;
    }
    else
    {
      iconGlass = block.getIcon(0, metadata);
      iconStreaks = block.getIcon(0, 16 | metadata);
      iconSide = block.getSideTextureIndex();
      iconOverlaySouth = block.getBlockOverlayTexture(blockAccess, x, y, z, 2);
      iconOverlayWest = block.getBlockOverlayTexture(blockAccess, x, y, z, 5);
    }

    double minXGlass = iconGlass.getMinU();
    double midXGlass = iconGlass.getInterpolatedU(8.0D);
    double maxXGlass = iconGlass.getMaxU();
    double minYGlass = iconGlass.getMinV();
    double maxYGlass = iconGlass.getMaxV();

    double minXStreaks = iconStreaks.getMinU();
    double midXStreaks = iconStreaks.getInterpolatedU(8.0D);
    double maxXStreaks = iconStreaks.getMaxU();
    double minYStreaks = iconStreaks.getMinV();
View Full Code Here


      float anaglyphBlue = (red * 30.0F + blue * 70.0F) / 100.0F;
      red = anaglyphRed;
      green = anaglyphGreen;
      blue = anaglyphBlue;
    }
    Icon iconGlass, iconStreaks, iconOverlay;

    iconGlass = block.getIcon(0, metadata);
    iconStreaks = block.getIcon(0, 16 | metadata);
    iconOverlay = block.getBlockOverlayTexture();

    double minXGlass = iconGlass.getMinU();
    double maxXGlass = iconGlass.getMaxU();
    double minYGlass = iconGlass.getMinV();
    double maxYGlass = iconGlass.getMaxV();

    double minXStreaks = iconStreaks.getMinU();
    double maxXStreaks = iconStreaks.getMaxU();
    double minYStreaks = iconStreaks.getMinV();
    double maxYStreaks = iconStreaks.getMaxV();
View Full Code Here

      red = anaglyphRed;
      green = anaglyphGreen;
      blue = anaglyphBlue;
    }

    Icon iconGlass, iconStreaks, iconOverlayTop, iconOverlaySouth, iconOverlayWest;

    iconGlass = block.getIcon(0, metadata);
    iconStreaks = block.getIcon(0, 16 | metadata);
    iconOverlayTop = block.getBlockOverlayTexture(blockAccess, x, y, z, 1);
    iconOverlaySouth = block.getBlockOverlayTexture(blockAccess, x, y, z, 2);
    iconOverlayWest = block.getBlockOverlayTexture(blockAccess, x, y, z, 5);

    double minXGlass = iconGlass.getMinU();
    double maxXGlass = iconGlass.getMaxU();
    double minYGlass = iconGlass.getMinV();
    double maxYGlass = iconGlass.getMaxV();

    double minXStreaks = iconStreaks.getMinU();
    double maxXStreaks = iconStreaks.getMaxU();
    double minYStreaks = iconStreaks.getMinV();
    double maxYStreaks = iconStreaks.getMaxV();
View Full Code Here

 
  private void renderConveyorWorld(RenderBlocks renderblocks, IBlockAccess iblockaccess, int blockX, int blockY, int blockZ, Block block, int renderId)
  {
    Tessellator tessellator = Tessellator.instance;
    int conveyorMetadata = iblockaccess.getBlockMetadata(blockX, blockY, blockZ);
    Icon conveyorTexture = renderblocks.overrideBlockTexture != null ? renderblocks.overrideBlockTexture : block.getBlockTexture(iblockaccess, blockX, blockY, blockZ, 0);
    tessellator.setBrightness(block.getMixedBrightnessForBlock(iblockaccess, blockX, blockY, blockZ));
    tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
   
    double uStart = conveyorTexture.getInterpolatedU(0);
    double uEnd = conveyorTexture.getInterpolatedU(16);
    double vStart = conveyorTexture.getInterpolatedV(0);
    double vEnd = conveyorTexture.getInterpolatedV(16);
   
    float renderHeight = 0.00625F;
   
    float vert1x = blockX + 1;
    float vert2x = blockX + 1;
View Full Code Here

      return;
    }
   
    ItemStack itemStack = stack.asItemStack();
   
    Icon icon = stack.getRenderingIcon();
    if (icon == null)
    {
      try
      {
        icon = itemStack.getIconIndex();
View Full Code Here

    float f11;
    int j1;
    int k1;
    int l1;
    int i2;
    Icon icon;
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 - 1, 2))
    {
      if(renderer.renderMinZ <= 0.0D)
      {
        --par4;
      }
     
      renderer.aoLightValueScratchXZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoLightValueScratchYZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchYZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoLightValueScratchXZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoBrightnessXZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoBrightnessYZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessYZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 - 1)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 - 1)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 + 1, par4 - 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 - 1, par4 - 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZNNN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNNN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 - 1, par4);
        renderer.aoBrightnessXYZNNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 - 1, par4);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZNPN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNPN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 + 1, par4);
        renderer.aoBrightnessXYZNPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 + 1, par4);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPNN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 - 1, par4);
        renderer.aoBrightnessXYZPNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 - 1, par4);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPPN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 + 1, par4);
        renderer.aoBrightnessXYZPPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 + 1, par4);
      }
     
      if(renderer.renderMinZ <= 0.0D)
      {
        ++par4;
      }
     
      i1 = l;
     
      if(renderer.renderMinZ <= 0.0D || !renderer.blockAccess.isBlockOpaqueCube(par2, par3, par4 - 1))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      f9 = (renderer.aoLightValueScratchXZNN + renderer.aoLightValueScratchXYZNPN + f7 + renderer.aoLightValueScratchYZPN) / 4.0F;
      f8 = (f7 + renderer.aoLightValueScratchYZPN + renderer.aoLightValueScratchXZPN + renderer.aoLightValueScratchXYZPPN) / 4.0F;
      f11 = (renderer.aoLightValueScratchYZNN + f7 + renderer.aoLightValueScratchXYZPNN + renderer.aoLightValueScratchXZPN) / 4.0F;
      f10 = (renderer.aoLightValueScratchXYZNNN + renderer.aoLightValueScratchXZNN + renderer.aoLightValueScratchYZNN + f7) / 4.0F;
      f3 = (float) (f9 * renderer.renderMaxY * (1.0D - renderer.renderMinX) + f8 * renderer.renderMinY * renderer.renderMinX
          + f11 * (1.0D - renderer.renderMaxY) * renderer.renderMinX + f10 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMinX));
      f4 = (float) (f9 * renderer.renderMaxY * (1.0D - renderer.renderMaxX) + f8 * renderer.renderMaxY * renderer.renderMaxX
          + f11 * (1.0D - renderer.renderMaxY) * renderer.renderMaxX + f10 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMaxX));
      f5 = (float) (f9 * renderer.renderMinY * (1.0D - renderer.renderMaxX) + f8 * renderer.renderMinY * renderer.renderMaxX
          + f11 * (1.0D - renderer.renderMinY) * renderer.renderMaxX + f10 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMaxX));
      f6 = (float) (f9 * renderer.renderMinY * (1.0D - renderer.renderMinX) + f8 * renderer.renderMinY * renderer.renderMinX
          + f11 * (1.0D - renderer.renderMinY) * renderer.renderMinX + f10 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMinX));
      k1 = renderer.getAoBrightness(renderer.aoBrightnessXZNN, renderer.aoBrightnessXYZNPN, renderer.aoBrightnessYZPN, i1);
      j1 = renderer.getAoBrightness(renderer.aoBrightnessYZPN, renderer.aoBrightnessXZPN, renderer.aoBrightnessXYZPPN, i1);
      i2 = renderer.getAoBrightness(renderer.aoBrightnessYZNN, renderer.aoBrightnessXYZPNN, renderer.aoBrightnessXZPN, i1);
      l1 = renderer.getAoBrightness(renderer.aoBrightnessXYZNNN, renderer.aoBrightnessXZNN, renderer.aoBrightnessYZNN, i1);
      renderer.brightnessTopLeft = renderer.mixAoBrightness(k1, j1, i2, l1, renderer.renderMaxY * (1.0D - renderer.renderMinX), renderer.renderMaxY
          * renderer.renderMinX, (1.0D - renderer.renderMaxY) * renderer.renderMinX, (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMinX));
      renderer.brightnessBottomLeft = renderer.mixAoBrightness(k1, j1, i2, l1, renderer.renderMaxY * (1.0D - renderer.renderMaxX), renderer.renderMaxY
          * renderer.renderMaxX, (1.0D - renderer.renderMaxY) * renderer.renderMaxX, (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMaxX));
      renderer.brightnessBottomRight = renderer.mixAoBrightness(k1, j1, i2, l1, renderer.renderMinY * (1.0D - renderer.renderMaxX), renderer.renderMinY
          * renderer.renderMaxX, (1.0D - renderer.renderMinY) * renderer.renderMaxX, (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMaxX));
      renderer.brightnessTopRight = renderer.mixAoBrightness(k1, j1, i2, l1, renderer.renderMinY * (1.0D - renderer.renderMinX), renderer.renderMinY
          * renderer.renderMinX, (1.0D - renderer.renderMinY) * renderer.renderMinX, (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMinX));
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.8F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.8F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 2);
      this.renderEastFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderEastFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 + 1, 3))
    {
      if(renderer.renderMaxZ >= 1.0D)
      {
        ++par4;
      }
     
      renderer.aoLightValueScratchXZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoLightValueScratchXZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoLightValueScratchYZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchYZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoBrightnessXZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoBrightnessYZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessYZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 + 1)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 + 1)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 + 1, par4 + 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 - 1, par4 + 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZNNP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNNP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 - 1, par4);
        renderer.aoBrightnessXYZNNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 - 1, par4);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZNPP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNPP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 + 1, par4);
        renderer.aoBrightnessXYZNPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 + 1, par4);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPNP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 - 1, par4);
        renderer.aoBrightnessXYZPNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 - 1, par4);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPPP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 + 1, par4);
        renderer.aoBrightnessXYZPPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 + 1, par4);
      }
     
      if(renderer.renderMaxZ >= 1.0D)
      {
        --par4;
      }
     
      i1 = l;
     
      if(renderer.renderMaxZ >= 1.0D || !renderer.blockAccess.isBlockOpaqueCube(par2, par3, par4 + 1))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      f9 = (renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchXYZNPP + f7 + renderer.aoLightValueScratchYZPP) / 4.0F;
      f8 = (f7 + renderer.aoLightValueScratchYZPP + renderer.aoLightValueScratchXZPP + renderer.aoLightValueScratchXYZPPP) / 4.0F;
      f11 = (renderer.aoLightValueScratchYZNP + f7 + renderer.aoLightValueScratchXYZPNP + renderer.aoLightValueScratchXZPP) / 4.0F;
      f10 = (renderer.aoLightValueScratchXYZNNP + renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchYZNP + f7) / 4.0F;
      f3 = (float) (f9 * renderer.renderMaxY * (1.0D - renderer.renderMinX) + f8 * renderer.renderMaxY * renderer.renderMinX
          + f11 * (1.0D - renderer.renderMaxY) * renderer.renderMinX + f10 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMinX));
      f4 = (float) (f9 * renderer.renderMinY * (1.0D - renderer.renderMinX) + f8 * renderer.renderMinY * renderer.renderMinX
          + f11 * (1.0D - renderer.renderMinY) * renderer.renderMinX + f10 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMinX));
      f5 = (float) (f9 * renderer.renderMinY * (1.0D - renderer.renderMaxX) + f8 * renderer.renderMinY * renderer.renderMaxX
          + f11 * (1.0D - renderer.renderMinY) * renderer.renderMaxX + f10 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMaxX));
      f6 = (float) (f9 * renderer.renderMaxY * (1.0D - renderer.renderMaxX) + f8 * renderer.renderMaxY * renderer.renderMaxX
          + f11 * (1.0D - renderer.renderMaxY) * renderer.renderMaxX + f10 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMaxX));
      k1 = renderer.getAoBrightness(renderer.aoBrightnessXZNP, renderer.aoBrightnessXYZNPP, renderer.aoBrightnessYZPP, i1);
      j1 = renderer.getAoBrightness(renderer.aoBrightnessYZPP, renderer.aoBrightnessXZPP, renderer.aoBrightnessXYZPPP, i1);
      i2 = renderer.getAoBrightness(renderer.aoBrightnessYZNP, renderer.aoBrightnessXYZPNP, renderer.aoBrightnessXZPP, i1);
      l1 = renderer.getAoBrightness(renderer.aoBrightnessXYZNNP, renderer.aoBrightnessXZNP, renderer.aoBrightnessYZNP, i1);
      renderer.brightnessTopLeft = renderer.mixAoBrightness(k1, l1, i2, j1, renderer.renderMaxY * (1.0D - renderer.renderMinX),
          (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMinX), (1.0D - renderer.renderMaxY) * renderer.renderMinX, renderer.renderMaxY
          * renderer.renderMinX);
      renderer.brightnessBottomLeft = renderer.mixAoBrightness(k1, l1, i2, j1, renderer.renderMinY * (1.0D - renderer.renderMinX),
          (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMinX), (1.0D - renderer.renderMinY) * renderer.renderMinX, renderer.renderMinY
          * renderer.renderMinX);
      renderer.brightnessBottomRight = renderer.mixAoBrightness(k1, l1, i2, j1, renderer.renderMinY * (1.0D - renderer.renderMaxX),
          (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMaxX), (1.0D - renderer.renderMinY) * renderer.renderMaxX, renderer.renderMinY
          * renderer.renderMaxX);
      renderer.brightnessTopRight = renderer.mixAoBrightness(k1, l1, i2, j1, renderer.renderMaxY * (1.0D - renderer.renderMaxX),
          (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMaxX), (1.0D - renderer.renderMaxY) * renderer.renderMaxX, renderer.renderMaxY
          * renderer.renderMaxX);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.8F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.8F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 3);
      this.renderWestFace(renderer, par1Block, par2, par3, par4,
          renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 3));
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderWestFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 - 1, par3, par4, 4))
    {
      if(renderer.renderMinX <= 0.0D)
      {
        --par2;
      }
     
      renderer.aoLightValueScratchXYNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchXZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoLightValueScratchXZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoLightValueScratchXYNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXYNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessXZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoBrightnessXZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoBrightnessXYNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3 + 1, par4)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3 - 1, par4)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 - 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 + 1)];
     
      if(!flag5 && !flag2)
      {
        renderer.aoLightValueScratchXYZNNN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNNN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 - 1);
        renderer.aoBrightnessXYZNNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 - 1);
      }
     
      if(!flag4 && !flag2)
      {
        renderer.aoLightValueScratchXYZNNP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNNP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 + 1);
        renderer.aoBrightnessXYZNNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 + 1);
      }
     
      if(!flag5 && !flag3)
      {
        renderer.aoLightValueScratchXYZNPN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNPN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 - 1);
        renderer.aoBrightnessXYZNPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 - 1);
      }
     
      if(!flag4 && !flag3)
      {
        renderer.aoLightValueScratchXYZNPP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNPP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 + 1);
        renderer.aoBrightnessXYZNPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 + 1);
      }
     
      if(renderer.renderMinX <= 0.0D)
      {
        ++par2;
      }
     
      i1 = l;
     
      if(renderer.renderMinX <= 0.0D || !renderer.blockAccess.isBlockOpaqueCube(par2 - 1, par3, par4))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      f9 = (renderer.aoLightValueScratchXYNN + renderer.aoLightValueScratchXYZNNP + f7 + renderer.aoLightValueScratchXZNP) / 4.0F;
      f8 = (f7 + renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchXYNP + renderer.aoLightValueScratchXYZNPP) / 4.0F;
      f11 = (renderer.aoLightValueScratchXZNN + f7 + renderer.aoLightValueScratchXYZNPN + renderer.aoLightValueScratchXYNP) / 4.0F;
      f10 = (renderer.aoLightValueScratchXYZNNN + renderer.aoLightValueScratchXYNN + renderer.aoLightValueScratchXZNN + f7) / 4.0F;
      f3 = (float) (f8 * renderer.renderMaxY * renderer.renderMaxZ + f11 * renderer.renderMaxY * (1.0D - renderer.renderMaxZ)
          + f10 * (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMaxZ) + f9 * (1.0D - renderer.renderMaxY)
          * renderer.renderMaxZ);
      f4 = (float) (f8 * renderer.renderMaxY * renderer.renderMinZ + f11 * renderer.renderMaxY * (1.0D - renderer.renderMinZ)
          + f10 * (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMinZ) + f9 * (1.0D - renderer.renderMaxY)
          * renderer.renderMinZ);
      f5 = (float) (f8 * renderer.renderMinY * renderer.renderMinZ + f11 * renderer.renderMinY * (1.0D - renderer.renderMinZ)
          + f10 * (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMinZ) + f9 * (1.0D - renderer.renderMinY)
          * renderer.renderMinZ);
      f6 = (float) (f8 * renderer.renderMinY * renderer.renderMaxZ + f11 * renderer.renderMinY * (1.0D - renderer.renderMaxZ)
          + f10 * (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMaxZ) + f9 * (1.0D - renderer.renderMinY)
          * renderer.renderMaxZ);
      k1 = renderer.getAoBrightness(renderer.aoBrightnessXYNN, renderer.aoBrightnessXYZNNP, renderer.aoBrightnessXZNP, i1);
      j1 = renderer.getAoBrightness(renderer.aoBrightnessXZNP, renderer.aoBrightnessXYNP, renderer.aoBrightnessXYZNPP, i1);
      i2 = renderer.getAoBrightness(renderer.aoBrightnessXZNN, renderer.aoBrightnessXYZNPN, renderer.aoBrightnessXYNP, i1);
      l1 = renderer.getAoBrightness(renderer.aoBrightnessXYZNNN, renderer.aoBrightnessXYNN, renderer.aoBrightnessXZNN, i1);
      renderer.brightnessTopLeft = renderer.mixAoBrightness(j1, i2, l1, k1, renderer.renderMaxY * renderer.renderMaxZ, renderer.renderMaxY
          * (1.0D - renderer.renderMaxZ), (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMaxZ), (1.0D - renderer.renderMaxY)
          * renderer.renderMaxZ);
      renderer.brightnessBottomLeft = renderer.mixAoBrightness(j1, i2, l1, k1, renderer.renderMaxY * renderer.renderMinZ, renderer.renderMaxY
          * (1.0D - renderer.renderMinZ), (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMinZ), (1.0D - renderer.renderMaxY)
          * renderer.renderMinZ);
      renderer.brightnessBottomRight = renderer.mixAoBrightness(j1, i2, l1, k1, renderer.renderMinY * renderer.renderMinZ, renderer.renderMinY
          * (1.0D - renderer.renderMinZ), (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMinZ), (1.0D - renderer.renderMinY)
          * renderer.renderMinZ);
      renderer.brightnessTopRight = renderer.mixAoBrightness(j1, i2, l1, k1, renderer.renderMinY * renderer.renderMaxZ, renderer.renderMinY
          * (1.0D - renderer.renderMaxZ), (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMaxZ), (1.0D - renderer.renderMinY)
          * renderer.renderMaxZ);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.6F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.6F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 4);
      this.renderNorthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderNorthFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 + 1, par3, par4, 5))
    {
      if(renderer.renderMaxX >= 1.0D)
      {
        ++par2;
      }
     
      renderer.aoLightValueScratchXYPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchXZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoLightValueScratchXZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoLightValueScratchXYPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXYPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessXZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoBrightnessXZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoBrightnessXYPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3 + 1, par4)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3 - 1, par4)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 + 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 - 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPNN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 - 1);
        renderer.aoBrightnessXYZPNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 - 1);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZPNP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPNP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 + 1);
        renderer.aoBrightnessXYZPNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 + 1);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPPN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPPN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 - 1);
        renderer.aoBrightnessXYZPPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 - 1);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPPP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 + 1);
        renderer.aoBrightnessXYZPPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 + 1);
      }
     
      if(renderer.renderMaxX >= 1.0D)
      {
        --par2;
      }
     
      i1 = l;
     
      if(renderer.renderMaxX >= 1.0D || !renderer.blockAccess.isBlockOpaqueCube(par2 + 1, par3, par4))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      f9 = (renderer.aoLightValueScratchXYPN + renderer.aoLightValueScratchXYZPNP + f7 + renderer.aoLightValueScratchXZPP) / 4.0F;
      f8 = (renderer.aoLightValueScratchXYZPNN + renderer.aoLightValueScratchXYPN + renderer.aoLightValueScratchXZPN + f7) / 4.0F;
      f11 = (renderer.aoLightValueScratchXZPN + f7 + renderer.aoLightValueScratchXYZPPN + renderer.aoLightValueScratchXYPP) / 4.0F;
      f10 = (f7 + renderer.aoLightValueScratchXZPP + renderer.aoLightValueScratchXYPP + renderer.aoLightValueScratchXYZPPP) / 4.0F;
      f3 = (float) (f9 * (1.0D - renderer.renderMinY) * renderer.renderMaxZ + f8 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMaxZ) + f11 * renderer.renderMinY * (1.0D - renderer.renderMaxZ) + f10 * renderer.renderMinY
          * renderer.renderMaxZ);
      f4 = (float) (f9 * (1.0D - renderer.renderMinY) * renderer.renderMinZ + f8 * (1.0D - renderer.renderMinY)
          * (1.0D - renderer.renderMinZ) + f11 * renderer.renderMinY * (1.0D - renderer.renderMinZ) + f10 * renderer.renderMinY
          * renderer.renderMinZ);
      f5 = (float) (f9 * (1.0D - renderer.renderMaxY) * renderer.renderMinZ + f8 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMinZ) + f11 * renderer.renderMaxY * (1.0D - renderer.renderMinZ) + f10 * renderer.renderMaxY
          * renderer.renderMinZ);
      f6 = (float) (f9 * (1.0D - renderer.renderMaxY) * renderer.renderMaxZ + f8 * (1.0D - renderer.renderMaxY)
          * (1.0D - renderer.renderMaxZ) + f11 * renderer.renderMaxY * (1.0D - renderer.renderMaxZ) + f10 * renderer.renderMaxY
          * renderer.renderMaxZ);
      k1 = renderer.getAoBrightness(renderer.aoBrightnessXYPN, renderer.aoBrightnessXYZPNP, renderer.aoBrightnessXZPP, i1);
      j1 = renderer.getAoBrightness(renderer.aoBrightnessXZPP, renderer.aoBrightnessXYPP, renderer.aoBrightnessXYZPPP, i1);
      i2 = renderer.getAoBrightness(renderer.aoBrightnessXZPN, renderer.aoBrightnessXYZPPN, renderer.aoBrightnessXYPP, i1);
      l1 = renderer.getAoBrightness(renderer.aoBrightnessXYZPNN, renderer.aoBrightnessXYPN, renderer.aoBrightnessXZPN, i1);
      renderer.brightnessTopLeft = renderer.mixAoBrightness(k1, l1, i2, j1, (1.0D - renderer.renderMinY) * renderer.renderMaxZ,
          (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMaxZ), renderer.renderMinY * (1.0D - renderer.renderMaxZ), renderer.renderMinY
          * renderer.renderMaxZ);
      renderer.brightnessBottomLeft = renderer.mixAoBrightness(k1, l1, i2, j1, (1.0D - renderer.renderMinY) * renderer.renderMinZ,
          (1.0D - renderer.renderMinY) * (1.0D - renderer.renderMinZ), renderer.renderMinY * (1.0D - renderer.renderMinZ), renderer.renderMinY
          * renderer.renderMinZ);
      renderer.brightnessBottomRight = renderer.mixAoBrightness(k1, l1, i2, j1, (1.0D - renderer.renderMaxY) * renderer.renderMinZ,
          (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMinZ), renderer.renderMaxY * (1.0D - renderer.renderMinZ), renderer.renderMaxY
          * renderer.renderMinZ);
      renderer.brightnessTopRight = renderer.mixAoBrightness(k1, l1, i2, j1, (1.0D - renderer.renderMaxY) * renderer.renderMaxZ,
          (1.0D - renderer.renderMaxY) * (1.0D - renderer.renderMaxZ), renderer.renderMaxY * (1.0D - renderer.renderMaxZ), renderer.renderMaxY
          * renderer.renderMaxZ);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.6F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.6F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 5);
      this.renderSouthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
View Full Code Here

      this.renderTopFace(renderer, par1Block, par2, par3, par4,
          renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 1));
      flag = true;
    }
   
    Icon icon;
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 - 1, 2))
    {
      if(renderer.renderMinZ <= 0.0D)
      {
        --par4;
      }
     
      renderer.aoLightValueScratchXZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoLightValueScratchYZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchYZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoLightValueScratchXZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoBrightnessXZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoBrightnessYZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessYZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 - 1)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 - 1)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 + 1, par4 - 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 - 1, par4 - 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZNNN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNNN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 - 1, par4);
        renderer.aoBrightnessXYZNNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 - 1, par4);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZNPN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNPN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 + 1, par4);
        renderer.aoBrightnessXYZNPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 + 1, par4);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPNN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 - 1, par4);
        renderer.aoBrightnessXYZPNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 - 1, par4);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPPN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 + 1, par4);
        renderer.aoBrightnessXYZPPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 + 1, par4);
      }
     
      if(renderer.renderMinZ <= 0.0D)
      {
        ++par4;
      }
     
      i1 = l;
     
      if(renderer.renderMinZ <= 0.0D || !renderer.blockAccess.isBlockOpaqueCube(par2, par3, par4 - 1))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      f3 = (renderer.aoLightValueScratchXZNN + renderer.aoLightValueScratchXYZNPN + f7 + renderer.aoLightValueScratchYZPN) / 4.0F;
      f4 = (f7 + renderer.aoLightValueScratchYZPN + renderer.aoLightValueScratchXZPN + renderer.aoLightValueScratchXYZPPN) / 4.0F;
      f5 = (renderer.aoLightValueScratchYZNN + f7 + renderer.aoLightValueScratchXYZPNN + renderer.aoLightValueScratchXZPN) / 4.0F;
      f6 = (renderer.aoLightValueScratchXYZNNN + renderer.aoLightValueScratchXZNN + renderer.aoLightValueScratchYZNN + f7) / 4.0F;
      renderer.brightnessTopLeft = renderer.getAoBrightness(renderer.aoBrightnessXZNN, renderer.aoBrightnessXYZNPN, renderer.aoBrightnessYZPN, i1);
      renderer.brightnessBottomLeft = renderer.getAoBrightness(renderer.aoBrightnessYZPN, renderer.aoBrightnessXZPN, renderer.aoBrightnessXYZPPN, i1);
      renderer.brightnessBottomRight = renderer.getAoBrightness(renderer.aoBrightnessYZNN, renderer.aoBrightnessXYZPNN, renderer.aoBrightnessXZPN, i1);
      renderer.brightnessTopRight = renderer.getAoBrightness(renderer.aoBrightnessXYZNNN, renderer.aoBrightnessXZNN, renderer.aoBrightnessYZNN, i1);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.8F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.8F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 2);
      this.renderEastFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderEastFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 + 1, 3))
    {
      if(renderer.renderMaxZ >= 1.0D)
      {
        ++par4;
      }
     
      renderer.aoLightValueScratchXZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoLightValueScratchXZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoLightValueScratchYZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchYZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      renderer.aoBrightnessXZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      renderer.aoBrightnessYZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessYZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 + 1)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 + 1)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 + 1, par4 + 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2, par3 - 1, par4 + 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZNNP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNNP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 - 1, par4);
        renderer.aoBrightnessXYZNNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 - 1, par4);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZNPP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNPP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3 + 1, par4);
        renderer.aoBrightnessXYZNPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3 + 1, par4);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPNP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 - 1, par4);
        renderer.aoBrightnessXYZPNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 - 1, par4);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPPP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3 + 1, par4);
        renderer.aoBrightnessXYZPPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3 + 1, par4);
      }
     
      if(renderer.renderMaxZ >= 1.0D)
      {
        --par4;
      }
     
      i1 = l;
     
      if(renderer.renderMaxZ >= 1.0D || !renderer.blockAccess.isBlockOpaqueCube(par2, par3, par4 + 1))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      f3 = (renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchXYZNPP + f7 + renderer.aoLightValueScratchYZPP) / 4.0F;
      f6 = (f7 + renderer.aoLightValueScratchYZPP + renderer.aoLightValueScratchXZPP + renderer.aoLightValueScratchXYZPPP) / 4.0F;
      f5 = (renderer.aoLightValueScratchYZNP + f7 + renderer.aoLightValueScratchXYZPNP + renderer.aoLightValueScratchXZPP) / 4.0F;
      f4 = (renderer.aoLightValueScratchXYZNNP + renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchYZNP + f7) / 4.0F;
      renderer.brightnessTopLeft = renderer.getAoBrightness(renderer.aoBrightnessXZNP, renderer.aoBrightnessXYZNPP, renderer.aoBrightnessYZPP, i1);
      renderer.brightnessTopRight = renderer.getAoBrightness(renderer.aoBrightnessYZPP, renderer.aoBrightnessXZPP, renderer.aoBrightnessXYZPPP, i1);
      renderer.brightnessBottomRight = renderer.getAoBrightness(renderer.aoBrightnessYZNP, renderer.aoBrightnessXYZPNP, renderer.aoBrightnessXZPP, i1);
      renderer.brightnessBottomLeft = renderer.getAoBrightness(renderer.aoBrightnessXYZNNP, renderer.aoBrightnessXZNP, renderer.aoBrightnessYZNP, i1);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.8F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.8F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.8F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.8F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 3);
      this.renderWestFace(renderer, par1Block, par2, par3, par4,
          renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 3));
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderWestFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 - 1, par3, par4, 4))
    {
      if(renderer.renderMinX <= 0.0D)
      {
        --par2;
      }
     
      renderer.aoLightValueScratchXYNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchXZNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoLightValueScratchXZNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoLightValueScratchXYNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXYNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessXZNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoBrightnessXZNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoBrightnessXYNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3 + 1, par4)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3 - 1, par4)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 - 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 - 1, par3, par4 + 1)];
     
      if(!flag5 && !flag2)
      {
        renderer.aoLightValueScratchXYZNNN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNNN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 - 1);
        renderer.aoBrightnessXYZNNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 - 1);
      }
     
      if(!flag4 && !flag2)
      {
        renderer.aoLightValueScratchXYZNNP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNNP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 + 1);
        renderer.aoBrightnessXYZNNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 + 1);
      }
     
      if(!flag5 && !flag3)
      {
        renderer.aoLightValueScratchXYZNPN = renderer.aoLightValueScratchXZNN;
        renderer.aoBrightnessXYZNPN = renderer.aoBrightnessXZNN;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 - 1);
        renderer.aoBrightnessXYZNPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 - 1);
      }
     
      if(!flag4 && !flag3)
      {
        renderer.aoLightValueScratchXYZNPP = renderer.aoLightValueScratchXZNP;
        renderer.aoBrightnessXYZNPP = renderer.aoBrightnessXZNP;
      }
      else
      {
        renderer.aoLightValueScratchXYZNPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 + 1);
        renderer.aoBrightnessXYZNPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 + 1);
      }
     
      if(renderer.renderMinX <= 0.0D)
      {
        ++par2;
      }
     
      i1 = l;
     
      if(renderer.renderMinX <= 0.0D || !renderer.blockAccess.isBlockOpaqueCube(par2 - 1, par3, par4))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 - 1, par3, par4);
      f6 = (renderer.aoLightValueScratchXYNN + renderer.aoLightValueScratchXYZNNP + f7 + renderer.aoLightValueScratchXZNP) / 4.0F;
      f3 = (f7 + renderer.aoLightValueScratchXZNP + renderer.aoLightValueScratchXYNP + renderer.aoLightValueScratchXYZNPP) / 4.0F;
      f4 = (renderer.aoLightValueScratchXZNN + f7 + renderer.aoLightValueScratchXYZNPN + renderer.aoLightValueScratchXYNP) / 4.0F;
      f5 = (renderer.aoLightValueScratchXYZNNN + renderer.aoLightValueScratchXYNN + renderer.aoLightValueScratchXZNN + f7) / 4.0F;
      renderer.brightnessTopRight = renderer.getAoBrightness(renderer.aoBrightnessXYNN, renderer.aoBrightnessXYZNNP, renderer.aoBrightnessXZNP, i1);
      renderer.brightnessTopLeft = renderer.getAoBrightness(renderer.aoBrightnessXZNP, renderer.aoBrightnessXYNP, renderer.aoBrightnessXYZNPP, i1);
      renderer.brightnessBottomLeft = renderer.getAoBrightness(renderer.aoBrightnessXZNN, renderer.aoBrightnessXYZNPN, renderer.aoBrightnessXYNP, i1);
      renderer.brightnessBottomRight = renderer.getAoBrightness(renderer.aoBrightnessXYZNNN, renderer.aoBrightnessXYNN, renderer.aoBrightnessXZNN, i1);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.6F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.6F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 4);
      this.renderNorthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
        renderer.colorGreenTopLeft *= par6;
        renderer.colorGreenBottomLeft *= par6;
        renderer.colorGreenBottomRight *= par6;
        renderer.colorGreenTopRight *= par6;
        renderer.colorBlueTopLeft *= par7;
        renderer.colorBlueBottomLeft *= par7;
        renderer.colorBlueBottomRight *= par7;
        renderer.colorBlueTopRight *= par7;
        this.renderNorthFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 + 1, par3, par4, 5))
    {
      if(renderer.renderMaxX >= 1.0D)
      {
        ++par2;
      }
     
      renderer.aoLightValueScratchXYPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoLightValueScratchXZPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoLightValueScratchXZPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoLightValueScratchXYPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4);
      renderer.aoBrightnessXYPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4);
      renderer.aoBrightnessXZPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1);
      renderer.aoBrightnessXZPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1);
      renderer.aoBrightnessXYPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4);
      flag3 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3 + 1, par4)];
      flag2 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3 - 1, par4)];
      flag5 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 + 1)];
      flag4 = Block.canBlockGrass[renderer.blockAccess.getBlockId(par2 + 1, par3, par4 - 1)];
     
      if(!flag2 && !flag4)
      {
        renderer.aoLightValueScratchXYZPNN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPNN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 - 1);
        renderer.aoBrightnessXYZPNN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 - 1);
      }
     
      if(!flag2 && !flag5)
      {
        renderer.aoLightValueScratchXYZPNP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPNP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPNP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 - 1, par4 + 1);
        renderer.aoBrightnessXYZPNP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 - 1, par4 + 1);
      }
     
      if(!flag3 && !flag4)
      {
        renderer.aoLightValueScratchXYZPPN = renderer.aoLightValueScratchXZPN;
        renderer.aoBrightnessXYZPPN = renderer.aoBrightnessXZPN;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPN = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 - 1);
        renderer.aoBrightnessXYZPPN = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 - 1);
      }
     
      if(!flag3 && !flag5)
      {
        renderer.aoLightValueScratchXYZPPP = renderer.aoLightValueScratchXZPP;
        renderer.aoBrightnessXYZPPP = renderer.aoBrightnessXZPP;
      }
      else
      {
        renderer.aoLightValueScratchXYZPPP = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2, par3 + 1, par4 + 1);
        renderer.aoBrightnessXYZPPP = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3 + 1, par4 + 1);
      }
     
      if(renderer.renderMaxX >= 1.0D)
      {
        --par2;
      }
     
      i1 = l;
     
      if(renderer.renderMaxX >= 1.0D || !renderer.blockAccess.isBlockOpaqueCube(par2 + 1, par3, par4))
      {
        i1 = par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4);
      }
     
      f7 = par1Block.getAmbientOcclusionLightValue(renderer.blockAccess, par2 + 1, par3, par4);
      f3 = (renderer.aoLightValueScratchXYPN + renderer.aoLightValueScratchXYZPNP + f7 + renderer.aoLightValueScratchXZPP) / 4.0F;
      f4 = (renderer.aoLightValueScratchXYZPNN + renderer.aoLightValueScratchXYPN + renderer.aoLightValueScratchXZPN + f7) / 4.0F;
      f5 = (renderer.aoLightValueScratchXZPN + f7 + renderer.aoLightValueScratchXYZPPN + renderer.aoLightValueScratchXYPP) / 4.0F;
      f6 = (f7 + renderer.aoLightValueScratchXZPP + renderer.aoLightValueScratchXYPP + renderer.aoLightValueScratchXYZPPP) / 4.0F;
      renderer.brightnessTopLeft = renderer.getAoBrightness(renderer.aoBrightnessXYPN, renderer.aoBrightnessXYZPNP, renderer.aoBrightnessXZPP, i1);
      renderer.brightnessTopRight = renderer.getAoBrightness(renderer.aoBrightnessXZPP, renderer.aoBrightnessXYPP, renderer.aoBrightnessXYZPPP, i1);
      renderer.brightnessBottomRight = renderer.getAoBrightness(renderer.aoBrightnessXZPN, renderer.aoBrightnessXYZPPN, renderer.aoBrightnessXYPP, i1);
      renderer.brightnessBottomLeft = renderer.getAoBrightness(renderer.aoBrightnessXYZPNN, renderer.aoBrightnessXYPN, renderer.aoBrightnessXZPN, i1);
     
      if(flag1)
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = par5 * 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = par6 * 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = par7 * 0.6F;
      }
      else
      {
        renderer.colorRedTopLeft = renderer.colorRedBottomLeft = renderer.colorRedBottomRight = renderer.colorRedTopRight = 0.6F;
        renderer.colorGreenTopLeft = renderer.colorGreenBottomLeft = renderer.colorGreenBottomRight = renderer.colorGreenTopRight = 0.6F;
        renderer.colorBlueTopLeft = renderer.colorBlueBottomLeft = renderer.colorBlueBottomRight = renderer.colorBlueTopRight = 0.6F;
      }
     
      renderer.colorRedTopLeft *= f3;
      renderer.colorGreenTopLeft *= f3;
      renderer.colorBlueTopLeft *= f3;
      renderer.colorRedBottomLeft *= f4;
      renderer.colorGreenBottomLeft *= f4;
      renderer.colorBlueBottomLeft *= f4;
      renderer.colorRedBottomRight *= f5;
      renderer.colorGreenBottomRight *= f5;
      renderer.colorBlueBottomRight *= f5;
      renderer.colorRedTopRight *= f6;
      renderer.colorGreenTopRight *= f6;
      renderer.colorBlueTopRight *= f6;
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 5);
      this.renderSouthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        renderer.colorRedTopLeft *= par5;
        renderer.colorRedBottomLeft *= par5;
        renderer.colorRedBottomRight *= par5;
        renderer.colorRedTopRight *= par5;
View Full Code Here

      this.renderTopFace(renderer, par1Block, par2, par3, par4,
          renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 1));
      flag = true;
    }
   
    Icon icon;
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 - 1, 2))
    {
      tessellator.setBrightness(renderer.renderMinZ > 0.0D ? l : par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 - 1));
      tessellator.setColorOpaque_F(f11, f14, f17);
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 2);
      this.renderEastFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        tessellator.setColorOpaque_F(f11 * par5, f14 * par6, f17 * par7);
        this.renderEastFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2, par3, par4 + 1, 3))
    {
      tessellator.setBrightness(renderer.renderMaxZ < 1.0D ? l : par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2, par3, par4 + 1));
      tessellator.setColorOpaque_F(f11, f14, f17);
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 3);
      this.renderWestFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        tessellator.setColorOpaque_F(f11 * par5, f14 * par6, f17 * par7);
        this.renderWestFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 - 1, par3, par4, 4))
    {
      tessellator.setBrightness(renderer.renderMinX > 0.0D ? l : par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 - 1, par3, par4));
      tessellator.setColorOpaque_F(f12, f15, f18);
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 4);
      this.renderNorthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        tessellator.setColorOpaque_F(f12 * par5, f15 * par6, f18 * par7);
        this.renderNorthFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
      flag = true;
    }
   
    if(renderer.renderAllFaces || par1Block.shouldSideBeRendered(renderer.blockAccess, par2 + 1, par3, par4, 5))
    {
      tessellator.setBrightness(renderer.renderMaxX < 1.0D ? l : par1Block.getMixedBrightnessForBlock(renderer.blockAccess, par2 + 1, par3, par4));
      tessellator.setColorOpaque_F(f12, f15, f18);
      icon = renderer.getBlockIcon(par1Block, renderer.blockAccess, par2, par3, par4, 5);
      this.renderSouthFace(renderer, par1Block, par2, par3, par4, icon);
     
      if(RenderBlocks.fancyGrass && icon.getIconName().equals("grass_side") && !renderer.hasOverrideBlockTexture())
      {
        tessellator.setColorOpaque_F(f12 * par5, f15 * par6, f18 * par7);
        this.renderSouthFace(renderer, par1Block, par2, par3, par4, BlockGrass.getIconSideOverlay());
      }
     
View Full Code Here

TOP

Related Classes of net.minecraft.util.Icon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.