public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k) {
   if (iblockaccess.getBlockId(i - 1, j, k) == blockID
       || iblockaccess.getBlockId(i + 1, j, k) == blockID) {
     float f = 0.5F;
     float f2 = 0.125F;
     setBlockBounds(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
   } else {
     float f1 = 0.125F;
     float f3 = 0.5F;
     setBlockBounds(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
   }
 }
 /** Updates the blocks bounds based on its current state. Args: world, x, y, z */
 public void setBlockBoundsBasedOnState(
     IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
   if (par1IBlockAccess.getBlockId(par2, par3, par4 - 1) == this.blockID) {
     this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F);
   } else if (par1IBlockAccess.getBlockId(par2, par3, par4 + 1) == this.blockID) {
     this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F);
   } else if (par1IBlockAccess.getBlockId(par2 - 1, par3, par4) == this.blockID) {
     this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
   } else if (par1IBlockAccess.getBlockId(par2 + 1, par3, par4) == this.blockID) {
     this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F);
   } else {
     this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
   }
 }
Esempio n. 3
0
  public static Icon getSideSnowGrassTexture(
      IBlockAccess var0, int var1, int var2, int var3, int var4) {
    if (!isBetterGrass()) {
      return TextureUtils.iconSnowSide;
    } else {
      if (isBetterGrassFancy()) {
        switch (var4) {
          case 2:
            --var3;
            break;

          case 3:
            ++var3;
            break;

          case 4:
            --var1;
            break;

          case 5:
            ++var1;
        }

        int var5 = var0.getBlockId(var1, var2, var3);

        if (var5 != 78 && var5 != 80) {
          return TextureUtils.iconSnowSide;
        }
      }

      return TextureUtils.iconSnow;
    }
  }
Esempio n. 4
0
 /**
  * Returns true if the given side of this block type should be rendered, if the adjacent block is
  * at the given coordinates. Args: blockAccess, x, y, z, side
  */
 public boolean shouldSideBeRendered(
     IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
   int var6 = par1IBlockAccess.getBlockId(par2, par3, par4);
   return var6 == this.blockID
       ? false
       : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
 }
  /** Updates the blocks bounds based on its current state. Args: world, x, y, z */
  public void setBlockBoundsBasedOnState(
      IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    float var5;
    float var6;

    if (par1IBlockAccess.getBlockId(par2 - 1, par3, par4) != this.blockID
        && par1IBlockAccess.getBlockId(par2 + 1, par3, par4) != this.blockID) {
      var5 = 0.125F;
      var6 = 0.5F;
      this.setBlockBounds(0.5F - var5, 0.0F, 0.5F - var6, 0.5F + var5, 1.0F, 0.5F + var6);
    } else {
      var5 = 0.5F;
      var6 = 0.125F;
      this.setBlockBounds(0.5F - var5, 0.0F, 0.5F - var6, 0.5F + var5, 1.0F, 0.5F + var6);
    }
  }
 protected int func_94488_g(
     IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
   int var6 = par1IBlockAccess.getBlockId(par2, par3, par4);
   return this.func_94477_d(var6)
       ? (var6 == Block.redstoneWire.blockID
           ? par1IBlockAccess.getBlockMetadata(par2, par3, par4)
           : par1IBlockAccess.isBlockProvidingPowerTo(par2, par3, par4, par5))
       : 0;
 }
 public static boolean isPowerProviderOrWire(IBlockAccess iblockaccess, int i, int j, int k) {
   int l = iblockaccess.getBlockId(i, j, k);
   if (l == Block.redstoneWire.blockID) {
     return true;
   }
   if (l == 0) {
     return false;
   }
   return Block.blocksList[l].canProvidePower();
 }
Esempio n. 8
0
  /**
   * Returns the current state of the stem. Returns -1 if the stem is not fully grown, or a value
   * between 0 and 3 based on the direction the stem is facing.
   */
  public int getState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    int i = par1IBlockAccess.getBlockMetadata(par2, par3, par4);

    if (i < 7) {
      return -1;
    }

    if (par1IBlockAccess.getBlockId(par2 - 1, par3, par4) == fruitType.blockID) {
      return 0;
    }

    if (par1IBlockAccess.getBlockId(par2 + 1, par3, par4) == fruitType.blockID) {
      return 1;
    }

    if (par1IBlockAccess.getBlockId(par2, par3, par4 - 1) == fruitType.blockID) {
      return 2;
    }

    return par1IBlockAccess.getBlockId(par2, par3, par4 + 1) != fruitType.blockID ? -1 : 3;
  }
Esempio n. 9
0
  /** Returns true if the specified block can be connected by a fence */
  public boolean canConnectFenceTo(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    int var5 = par1IBlockAccess.getBlockId(par2, par3, par4);

    if (var5 != this.blockID && var5 != Block.fenceGate.blockID) {
      Block var6 = Block.blocksList[var5];
      return var6 != null && var6.blockMaterial.isOpaque() && var6.renderAsNormalBlock()
          ? var6.blockMaterial != Material.pumpkin
          : false;
    } else {
      return true;
    }
  }
Esempio n. 10
0
  /** Updates the blocks bounds based on its current state. Args: world, x, y, z */
  public void setBlockBoundsBasedOnState(
      IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    float var5 = 0.4375F;
    float var6 = 0.5625F;
    float var7 = 0.4375F;
    float var8 = 0.5625F;
    boolean var9 =
        this.canThisPaneConnectToThisBlockID(par1IBlockAccess.getBlockId(par2, par3, par4 - 1));
    boolean var10 =
        this.canThisPaneConnectToThisBlockID(par1IBlockAccess.getBlockId(par2, par3, par4 + 1));
    boolean var11 =
        this.canThisPaneConnectToThisBlockID(par1IBlockAccess.getBlockId(par2 - 1, par3, par4));
    boolean var12 =
        this.canThisPaneConnectToThisBlockID(par1IBlockAccess.getBlockId(par2 + 1, par3, par4));

    if ((!var11 || !var12) && (var11 || var12 || var9 || var10)) {
      if (var11 && !var12) {
        var5 = 0.0F;
      } else if (!var11 && var12) {
        var6 = 1.0F;
      }
    } else {
      var5 = 0.0F;
      var6 = 1.0F;
    }

    if ((!var9 || !var10) && (var11 || var12 || var9 || var10)) {
      if (var9 && !var10) {
        var7 = 0.0F;
      } else if (!var9 && var10) {
        var8 = 1.0F;
      }
    } else {
      var7 = 0.0F;
      var8 = 1.0F;
    }

    this.setBlockBounds(var5, 0.0F, var7, var6, 1.0F, var8);
  }
Esempio n. 11
0
  /**
   * Returns true if the block coordinate passed can provide power, or is a redstone wire, or if its
   * a repeater that is powered.
   */
  public static boolean isPoweredOrRepeater(
      IBlockAccess par0IBlockAccess, int par1, int par2, int par3, int par4) {
    if (isPowerProviderOrWire(par0IBlockAccess, par1, par2, par3, par4)) {
      return true;
    } else {
      int var5 = par0IBlockAccess.getBlockId(par1, par2, par3);

      if (var5 == Block.redstoneRepeaterActive.blockID) {
        int var6 = par0IBlockAccess.getBlockMetadata(par1, par2, par3);
        return par4 == (var6 & 3);
      } else {
        return false;
      }
    }
  }
Esempio n. 12
0
  /**
   * Returns true if redstone wire can connect to the specified block. Params: World, X, Y, Z, side
   * (not a normal notch-side, this can be 0, 1, 2, 3 or -1)
   */
  public static boolean isPowerProviderOrWire(
      IBlockAccess par0IBlockAccess, int par1, int par2, int par3, int par4) {
    int var5 = par0IBlockAccess.getBlockId(par1, par2, par3);

    if (var5 == Block.redstoneWire.blockID) {
      return true;
    } else if (var5 == 0) {
      return false;
    } else if (!Block.redstoneRepeaterIdle.func_94487_f(var5)) {
      return Block.blocksList[var5].canProvidePower() && par4 != -1;
    } else {
      int var6 = par0IBlockAccess.getBlockMetadata(par1, par2, par3);
      return par4 == (var6 & 3) || par4 == Direction.footInvisibleFaceRemap[var6 & 3];
    }
  }
Esempio n. 13
0
  public static Icon getSideGrassTexture(
      IBlockAccess var0, int var1, int var2, int var3, int var4, Icon var5) {
    if (!isBetterGrass()) {
      return var5;
    } else {
      Icon var6 = TextureUtils.iconGrassTop;
      byte var7 = 2;

      if (var5 == TextureUtils.iconMycelSide) {
        var6 = TextureUtils.iconMycelTop;
        var7 = 110;
      }

      if (isBetterGrassFancy()) {
        --var2;

        switch (var4) {
          case 2:
            --var3;
            break;

          case 3:
            ++var3;
            break;

          case 4:
            --var1;
            break;

          case 5:
            ++var1;
        }

        int var8 = var0.getBlockId(var1, var2, var3);

        if (var8 != var7) {
          return var5;
        }
      }

      return var6;
    }
  }
Esempio n. 14
0
 /**
  * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
  */
 public boolean canBlockCatchFire(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
   return chanceToEncourageFire[par1IBlockAccess.getBlockId(par2, par3, par4)] > 0;
 }
Esempio n. 15
0
  /** Updates the blocks bounds based on its current state. Args: world, x, y, z */
  public void setBlockBoundsBasedOnState(
      IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
    float var7 = 1.0F;
    float var8 = 1.0F;
    float var9 = 1.0F;
    float var10 = 0.0F;
    float var11 = 0.0F;
    float var12 = 0.0F;
    boolean var13 = var6 > 0;

    if ((var6 & 2) != 0) {
      var10 = Math.max(var10, 0.0625F);
      var7 = 0.0F;
      var8 = 0.0F;
      var11 = 1.0F;
      var9 = 0.0F;
      var12 = 1.0F;
      var13 = true;
    }

    if ((var6 & 8) != 0) {
      var7 = Math.min(var7, 0.9375F);
      var10 = 1.0F;
      var8 = 0.0F;
      var11 = 1.0F;
      var9 = 0.0F;
      var12 = 1.0F;
      var13 = true;
    }

    if ((var6 & 4) != 0) {
      var12 = Math.max(var12, 0.0625F);
      var9 = 0.0F;
      var7 = 0.0F;
      var10 = 1.0F;
      var8 = 0.0F;
      var11 = 1.0F;
      var13 = true;
    }

    if ((var6 & 1) != 0) {
      var9 = Math.min(var9, 0.9375F);
      var12 = 1.0F;
      var7 = 0.0F;
      var10 = 1.0F;
      var8 = 0.0F;
      var11 = 1.0F;
      var13 = true;
    }

    if (!var13 && this.canBePlacedOn(par1IBlockAccess.getBlockId(par2, par3 + 1, par4))) {
      var8 = Math.min(var8, 0.9375F);
      var11 = 1.0F;
      var7 = 0.0F;
      var10 = 1.0F;
      var9 = 0.0F;
      var12 = 1.0F;
    }

    this.setBlockBounds(var7, var8, var9, var10, var11, var12);
  }
Esempio n. 16
0
  public boolean func_82542_g(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    int var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
    int var6 = var5 & 3;
    float var7 = 0.5F;
    float var8 = 1.0F;

    if ((var5 & 4) != 0) {
      var7 = 0.0F;
      var8 = 0.5F;
    }

    float var9 = 0.0F;
    float var10 = 1.0F;
    float var11 = 0.0F;
    float var12 = 0.5F;
    boolean var13 = true;
    int var14;
    int var15;
    int var16;

    if (var6 == 0) {
      var9 = 0.5F;
      var12 = 1.0F;
      var14 = par1IBlockAccess.getBlockId(par2 + 1, par3, par4);
      var15 = par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4);

      if (isBlockStairsID(var14) && (var5 & 4) == (var15 & 4)) {
        var16 = var15 & 3;

        if (var16 == 3 && !this.func_82540_f(par1IBlockAccess, par2, par3, par4 + 1, var5)) {
          var12 = 0.5F;
          var13 = false;
        } else if (var16 == 2 && !this.func_82540_f(par1IBlockAccess, par2, par3, par4 - 1, var5)) {
          var11 = 0.5F;
          var13 = false;
        }
      }
    } else if (var6 == 1) {
      var10 = 0.5F;
      var12 = 1.0F;
      var14 = par1IBlockAccess.getBlockId(par2 - 1, par3, par4);
      var15 = par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4);

      if (isBlockStairsID(var14) && (var5 & 4) == (var15 & 4)) {
        var16 = var15 & 3;

        if (var16 == 3 && !this.func_82540_f(par1IBlockAccess, par2, par3, par4 + 1, var5)) {
          var12 = 0.5F;
          var13 = false;
        } else if (var16 == 2 && !this.func_82540_f(par1IBlockAccess, par2, par3, par4 - 1, var5)) {
          var11 = 0.5F;
          var13 = false;
        }
      }
    } else if (var6 == 2) {
      var11 = 0.5F;
      var12 = 1.0F;
      var14 = par1IBlockAccess.getBlockId(par2, par3, par4 + 1);
      var15 = par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1);

      if (isBlockStairsID(var14) && (var5 & 4) == (var15 & 4)) {
        var16 = var15 & 3;

        if (var16 == 1 && !this.func_82540_f(par1IBlockAccess, par2 + 1, par3, par4, var5)) {
          var10 = 0.5F;
          var13 = false;
        } else if (var16 == 0 && !this.func_82540_f(par1IBlockAccess, par2 - 1, par3, par4, var5)) {
          var9 = 0.5F;
          var13 = false;
        }
      }
    } else if (var6 == 3) {
      var14 = par1IBlockAccess.getBlockId(par2, par3, par4 - 1);
      var15 = par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1);

      if (isBlockStairsID(var14) && (var5 & 4) == (var15 & 4)) {
        var16 = var15 & 3;

        if (var16 == 1 && !this.func_82540_f(par1IBlockAccess, par2 + 1, par3, par4, var5)) {
          var10 = 0.5F;
          var13 = false;
        } else if (var16 == 0 && !this.func_82540_f(par1IBlockAccess, par2 - 1, par3, par4, var5)) {
          var9 = 0.5F;
          var13 = false;
        }
      }
    }

    this.setBlockBounds(var9, var7, var11, var10, var8, var12);
    return var13;
  }
Esempio n. 17
0
 private boolean func_82540_f(
     IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
   int var6 = par1IBlockAccess.getBlockId(par2, par3, par4);
   return isBlockStairsID(var6) && par1IBlockAccess.getBlockMetadata(par2, par3, par4) == par5;
 }
 public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k) {
   return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
 }
  public static boolean renderBlockRedstoneWire(
      RenderBlocks r,
      IBlockAccess blockAccess,
      Block par1Block,
      int par2,
      int par3,
      int par4,
      Icon override) {
    Tessellator tessellator = Tessellator.instance;

    int i = blockAccess.getBlockMetadata(par2, par3, par4);
    Icon icon = BlockRedstoneWire.func_94409_b("cross");
    Icon icon1 = BlockRedstoneWire.func_94409_b("line");
    Icon icon2 = BlockRedstoneWire.func_94409_b("cross_overlay");
    Icon icon3 = BlockRedstoneWire.func_94409_b("line_overlay");
    if (!Minecraft.oldlighting) {
      tessellator.setBrightness(
          par1Block.getMixedBrightnessForBlock(blockAccess, par2, par3, par4));
    }
    float f =
        Minecraft.oldlighting ? par1Block.getBlockBrightness(blockAccess, par2, par3, par4) : 1.0F;
    float f1 = (float) i / 15F;
    float f2 = f1 * 0.6F + 0.4F;

    if (i == 0) {
      f2 = 0.3F;
    }

    float f3 = f1 * f1 * 0.7F - 0.5F;
    float f4 = f1 * f1 * 0.6F - 0.7F;

    if (f3 < 0.0F) {
      f3 = 0.0F;
    }

    if (f4 < 0.0F) {
      f4 = 0.0F;
    }

    tessellator.setColorOpaque_F(f * f2, f * f3, f * f4);
    boolean flag =
        BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2 - 1, par3, par4, 1)
            || !blockAccess.isBlockNormalCube(par2 - 1, par3, par4)
                && BlockRedstoneWire.isPowerProviderOrWire(
                    blockAccess, par2 - 1, par3 - 1, par4, -1);
    boolean flag1 =
        BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2 + 1, par3, par4, 3)
            || !blockAccess.isBlockNormalCube(par2 + 1, par3, par4)
                && BlockRedstoneWire.isPowerProviderOrWire(
                    blockAccess, par2 + 1, par3 - 1, par4, -1);
    boolean flag2 =
        BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2, par3, par4 - 1, 2)
            || !blockAccess.isBlockNormalCube(par2, par3, par4 - 1)
                && BlockRedstoneWire.isPowerProviderOrWire(
                    blockAccess, par2, par3 - 1, par4 - 1, -1);
    boolean flag3 =
        BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2, par3, par4 + 1, 0)
            || !blockAccess.isBlockNormalCube(par2, par3, par4 + 1)
                && BlockRedstoneWire.isPowerProviderOrWire(
                    blockAccess, par2, par3 - 1, par4 + 1, -1);

    if (!blockAccess.isBlockNormalCube(par2, par3 + 1, par4)) {
      if (blockAccess.isBlockNormalCube(par2 - 1, par3, par4)
          && BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2 - 1, par3 + 1, par4, -1)) {
        flag = true;
      }

      if (blockAccess.isBlockNormalCube(par2 + 1, par3, par4)
          && BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2 + 1, par3 + 1, par4, -1)) {
        flag1 = true;
      }

      if (blockAccess.isBlockNormalCube(par2, par3, par4 - 1)
          && BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2, par3 + 1, par4 - 1, -1)) {
        flag2 = true;
      }

      if (blockAccess.isBlockNormalCube(par2, par3, par4 + 1)
          && BlockRedstoneWire.isPowerProviderOrWire(blockAccess, par2, par3 + 1, par4 + 1, -1)) {
        flag3 = true;
      }
    }

    float f5 = par2 + 0;
    float f6 = par2 + 1;
    float f7 = par4 + 0;
    float f8 = par4 + 1;
    byte byte0 = 0;

    if ((flag || flag1) && !flag2 && !flag3) {
      byte0 = 1;
    }

    if ((flag2 || flag3) && !flag1 && !flag) {
      byte0 = 2;
    }

    if (byte0 == 0) {
      int j = 0;
      int k = 0;
      int l = 16;
      int i1 = 16;

      if (flag1 || flag2 || flag3 || flag) {
        if (!flag) {
          f5 += 0.3125F;
        }

        if (!flag) {
          j += 5;
        }

        if (!flag1) {
          f6 -= 0.3125F;
        }

        if (!flag1) {
          l -= 5;
        }

        if (!flag2) {
          f7 += 0.3125F;
        }

        if (!flag2) {
          k += 5;
        }

        if (!flag3) {
          f8 -= 0.3125F;
        }

        if (!flag3) {
          i1 -= 5;
        }
      }

      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon.getInterpolatedU(l), icon.getInterpolatedV(i1));
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon.getInterpolatedU(l), icon.getInterpolatedV(k));
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon.getInterpolatedU(j), icon.getInterpolatedV(k));
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon.getInterpolatedU(j), icon.getInterpolatedV(i1));
      tessellator.setColorOpaque_F(f, f, f);
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon2.getInterpolatedU(l), icon2.getInterpolatedV(i1));
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon2.getInterpolatedU(l), icon2.getInterpolatedV(k));
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon2.getInterpolatedU(j), icon2.getInterpolatedV(k));
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon2.getInterpolatedU(j), icon2.getInterpolatedV(i1));
    } else if (byte0 == 1) {
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon1.getMaxU(), icon1.getMaxV());
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon1.getMaxU(), icon1.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon1.getMinU(), icon1.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon1.getMinU(), icon1.getMaxV());
      tessellator.setColorOpaque_F(f, f, f);
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon3.getMaxU(), icon3.getMaxV());
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon3.getMaxU(), icon3.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon3.getMinU(), icon3.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon3.getMinU(), icon3.getMaxV());
    } else {
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon1.getMaxU(), icon1.getMaxV());
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon1.getMinU(), icon1.getMaxV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon1.getMinU(), icon1.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon1.getMaxU(), icon1.getMinV());
      tessellator.setColorOpaque_F(f, f, f);
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f8, icon3.getMaxU(), icon3.getMaxV());
      tessellator.addVertexWithUV(
          f6, (double) par3 + 0.015625D, f7, icon3.getMinU(), icon3.getMaxV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f7, icon3.getMinU(), icon3.getMinV());
      tessellator.addVertexWithUV(
          f5, (double) par3 + 0.015625D, f8, icon3.getMaxU(), icon3.getMinV());
    }

    if (!blockAccess.isBlockNormalCube(par2, par3 + 1, par4)) {
      if (blockAccess.isBlockNormalCube(par2 - 1, par3, par4)
          && blockAccess.getBlockId(par2 - 1, par3 + 1, par4) == Block.redstoneWire.blockID) {
        tessellator.setColorOpaque_F(f * f2, f * f3, f * f4);
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 1,
            icon1.getMaxU(),
            icon1.getMinV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D, par3 + 0, par4 + 1, icon1.getMinU(), icon1.getMinV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D, par3 + 0, par4 + 0, icon1.getMinU(), icon1.getMaxV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 0,
            icon1.getMaxU(),
            icon1.getMaxV());
        tessellator.setColorOpaque_F(f, f, f);
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 1,
            icon3.getMaxU(),
            icon3.getMinV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D, par3 + 0, par4 + 1, icon3.getMinU(), icon3.getMinV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D, par3 + 0, par4 + 0, icon3.getMinU(), icon3.getMaxV());
        tessellator.addVertexWithUV(
            (double) par2 + 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 0,
            icon3.getMaxU(),
            icon3.getMaxV());
      }

      if (blockAccess.isBlockNormalCube(par2 + 1, par3, par4)
          && blockAccess.getBlockId(par2 + 1, par3 + 1, par4) == Block.redstoneWire.blockID) {
        tessellator.setColorOpaque_F(f * f2, f * f3, f * f4);
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D, par3 + 0, par4 + 1, icon1.getMinU(), icon1.getMaxV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 1,
            icon1.getMaxU(),
            icon1.getMaxV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 0,
            icon1.getMaxU(),
            icon1.getMinV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D, par3 + 0, par4 + 0, icon1.getMinU(), icon1.getMinV());
        tessellator.setColorOpaque_F(f, f, f);
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D, par3 + 0, par4 + 1, icon3.getMinU(), icon3.getMaxV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 1,
            icon3.getMaxU(),
            icon3.getMaxV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D,
            (float) (par3 + 1) + 0.021875F,
            par4 + 0,
            icon3.getMaxU(),
            icon3.getMinV());
        tessellator.addVertexWithUV(
            (double) (par2 + 1) - 0.015625D, par3 + 0, par4 + 0, icon3.getMinU(), icon3.getMinV());
      }

      if (blockAccess.isBlockNormalCube(par2, par3, par4 - 1)
          && blockAccess.getBlockId(par2, par3 + 1, par4 - 1) == Block.redstoneWire.blockID) {
        tessellator.setColorOpaque_F(f * f2, f * f3, f * f4);
        tessellator.addVertexWithUV(
            par2 + 1, par3 + 0, (double) par4 + 0.015625D, icon1.getMinU(), icon1.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 1,
            (float) (par3 + 1) + 0.021875F,
            (double) par4 + 0.015625D,
            icon1.getMaxU(),
            icon1.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 0,
            (float) (par3 + 1) + 0.021875F,
            (double) par4 + 0.015625D,
            icon1.getMaxU(),
            icon1.getMinV());
        tessellator.addVertexWithUV(
            par2 + 0, par3 + 0, (double) par4 + 0.015625D, icon1.getMinU(), icon1.getMinV());
        tessellator.setColorOpaque_F(f, f, f);
        tessellator.addVertexWithUV(
            par2 + 1, par3 + 0, (double) par4 + 0.015625D, icon3.getMinU(), icon3.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 1,
            (float) (par3 + 1) + 0.021875F,
            (double) par4 + 0.015625D,
            icon3.getMaxU(),
            icon3.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 0,
            (float) (par3 + 1) + 0.021875F,
            (double) par4 + 0.015625D,
            icon3.getMaxU(),
            icon3.getMinV());
        tessellator.addVertexWithUV(
            par2 + 0, par3 + 0, (double) par4 + 0.015625D, icon3.getMinU(), icon3.getMinV());
      }

      if (blockAccess.isBlockNormalCube(par2, par3, par4 + 1)
          && blockAccess.getBlockId(par2, par3 + 1, par4 + 1) == Block.redstoneWire.blockID) {
        tessellator.setColorOpaque_F(f * f2, f * f3, f * f4);
        tessellator.addVertexWithUV(
            par2 + 1,
            (float) (par3 + 1) + 0.021875F,
            (double) (par4 + 1) - 0.015625D,
            icon1.getMaxU(),
            icon1.getMinV());
        tessellator.addVertexWithUV(
            par2 + 1, par3 + 0, (double) (par4 + 1) - 0.015625D, icon1.getMinU(), icon1.getMinV());
        tessellator.addVertexWithUV(
            par2 + 0, par3 + 0, (double) (par4 + 1) - 0.015625D, icon1.getMinU(), icon1.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 0,
            (float) (par3 + 1) + 0.021875F,
            (double) (par4 + 1) - 0.015625D,
            icon1.getMaxU(),
            icon1.getMaxV());
        tessellator.setColorOpaque_F(f, f, f);
        tessellator.addVertexWithUV(
            par2 + 1,
            (float) (par3 + 1) + 0.021875F,
            (double) (par4 + 1) - 0.015625D,
            icon3.getMaxU(),
            icon3.getMinV());
        tessellator.addVertexWithUV(
            par2 + 1, par3 + 0, (double) (par4 + 1) - 0.015625D, icon3.getMinU(), icon3.getMinV());
        tessellator.addVertexWithUV(
            par2 + 0, par3 + 0, (double) (par4 + 1) - 0.015625D, icon3.getMinU(), icon3.getMaxV());
        tessellator.addVertexWithUV(
            par2 + 0,
            (float) (par3 + 1) + 0.021875F,
            (double) (par4 + 1) - 0.015625D,
            icon3.getMaxU(),
            icon3.getMaxV());
      }
    }

    return true;
  }