Exemple #1
0
  protected void func_77093_a(EntitySnowman p_77093_1_, float p_77093_2_) {
    super.func_77029_c(p_77093_1_, p_77093_2_);
    ItemStack var3 = new ItemStack(Block.field_72061_ba, 1);
    if (var3 != null && var3.func_77973_b().field_77779_bT < 256) {
      GL11.glPushMatrix();
      this.field_77094_a.field_78195_c.func_78794_c(0.0625F);
      if (RenderBlocks.func_78597_b(Block.field_71973_m[var3.field_77993_c].func_71857_b())) {
        float var4 = 0.625F;
        GL11.glTranslatef(0.0F, -0.34375F, 0.0F);
        GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var4, -var4, var4);
      }

      this.field_76990_c.field_78721_f.func_78443_a(p_77093_1_, var3, 0);
      GL11.glPopMatrix();
    }
  }
  protected void func_4015_a(EntityPlayer p_4015_1_, float p_4015_2_) {
    super.func_6331_b(p_4015_1_, p_4015_2_);
    ItemStack var3 = p_4015_1_.field_778_b.func_492_d(3);
    if (var3 != null && var3.func_1091_a().field_291_aS < 256) {
      GL11.glPushMatrix();
      this.field_209_f.field_1286_a.func_926_b(0.0625F);
      if (RenderBlocks.func_1219_a(Block.field_345_n[var3.field_1617_c].func_210_f())) {
        float var4 = 0.625F;
        GL11.glTranslatef(0.0F, -0.25F, 0.0F);
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var4, -var4, var4);
      }

      this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var3, 0);
      GL11.glPopMatrix();
    }

    float var6;
    if (p_4015_1_.field_771_i.equals("deadmau5")
        && this.func_140_a(p_4015_1_.field_20047_bv, (String) null)) {
      for (int var19 = 0; var19 < 2; ++var19) {
        float var5 =
            p_4015_1_.field_603_as
                + (p_4015_1_.field_605_aq - p_4015_1_.field_603_as) * p_4015_2_
                - (p_4015_1_.field_734_o
                    + (p_4015_1_.field_735_n - p_4015_1_.field_734_o) * p_4015_2_);
        var6 =
            p_4015_1_.field_602_at + (p_4015_1_.field_604_ar - p_4015_1_.field_602_at) * p_4015_2_;
        GL11.glPushMatrix();
        GL11.glRotatef(var5, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(var6, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.375F * (float) (var19 * 2 - 1), 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.375F, 0.0F);
        GL11.glRotatef(-var6, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-var5, 0.0F, 1.0F, 0.0F);
        float var7 = 1.3333334F;
        GL11.glScalef(var7, var7, var7);
        this.field_209_f.func_20095_a(0.0625F);
        GL11.glPopMatrix();
      }
    }

    float var10;
    if (this.func_140_a(p_4015_1_.field_20067_q, (String) null)) {
      GL11.glPushMatrix();
      GL11.glTranslatef(0.0F, 0.0F, 0.125F);
      double var22 =
          p_4015_1_.field_20066_r
              + (p_4015_1_.field_20063_u - p_4015_1_.field_20066_r) * (double) p_4015_2_
              - (p_4015_1_.field_9285_at
                  + (p_4015_1_.field_611_ak - p_4015_1_.field_9285_at) * (double) p_4015_2_);
      double var23 =
          p_4015_1_.field_20065_s
              + (p_4015_1_.field_20062_v - p_4015_1_.field_20065_s) * (double) p_4015_2_
              - (p_4015_1_.field_9284_au
                  + (p_4015_1_.field_610_al - p_4015_1_.field_9284_au) * (double) p_4015_2_);
      double var8 =
          p_4015_1_.field_20064_t
              + (p_4015_1_.field_20061_w - p_4015_1_.field_20064_t) * (double) p_4015_2_
              - (p_4015_1_.field_9283_av
                  + (p_4015_1_.field_609_am - p_4015_1_.field_9283_av) * (double) p_4015_2_);
      var10 = p_4015_1_.field_734_o + (p_4015_1_.field_735_n - p_4015_1_.field_734_o) * p_4015_2_;
      double var11 = (double) MathHelper.func_1106_a(var10 * 3.1415927F / 180.0F);
      double var13 = (double) (-MathHelper.func_1114_b(var10 * 3.1415927F / 180.0F));
      float var15 = (float) var23 * 10.0F;
      if (var15 < -6.0F) {
        var15 = -6.0F;
      }

      if (var15 > 32.0F) {
        var15 = 32.0F;
      }

      float var16 = (float) (var22 * var11 + var8 * var13) * 100.0F;
      float var17 = (float) (var22 * var13 - var8 * var11) * 100.0F;
      if (var16 < 0.0F) {
        var16 = 0.0F;
      }

      float var18 =
          p_4015_1_.field_775_e + (p_4015_1_.field_774_f - p_4015_1_.field_775_e) * p_4015_2_;
      var15 +=
          MathHelper.func_1106_a(
                  (p_4015_1_.field_9291_aR
                          + (p_4015_1_.field_9290_aS - p_4015_1_.field_9291_aR) * p_4015_2_)
                      * 6.0F)
              * 32.0F
              * var18;
      if (p_4015_1_.func_381_o()) {
        var15 += 25.0F;
      }

      GL11.glRotatef(6.0F + var16 / 2.0F + var15, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(var17 / 2.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var17 / 2.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
      this.field_209_f.func_20096_b(0.0625F);
      GL11.glPopMatrix();
    }

    ItemStack var21 = p_4015_1_.field_778_b.func_494_a();
    if (var21 != null) {
      GL11.glPushMatrix();
      this.field_209_f.field_1283_d.func_926_b(0.0625F);
      GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
      if (p_4015_1_.field_4128_n != null) {
        var21 = new ItemStack(Item.field_266_B);
      }

      EnumAction var20 = null;
      if (p_4015_1_.func_35205_Y() > 0) {
        var20 = var21.func_35865_n();
      }

      if (var21.field_1617_c < 256
          && RenderBlocks.func_1219_a(Block.field_345_n[var21.field_1617_c].func_210_f())) {
        var6 = 0.5F;
        GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
        var6 *= 0.75F;
        GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
      } else if (var21.field_1617_c == Item.field_227_i.field_291_aS) {
        var6 = 0.625F;
        GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
        GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
        GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      } else if (Item.field_233_c[var21.field_1617_c].func_4017_a()) {
        var6 = 0.625F;
        if (Item.field_233_c[var21.field_1617_c].func_4023_b()) {
          GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
          GL11.glTranslatef(0.0F, -0.125F, 0.0F);
        }

        if (p_4015_1_.func_35205_Y() > 0 && var20 == EnumAction.block) {
          GL11.glTranslatef(0.05F, 0.0F, -0.1F);
          GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F);
        }

        GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
        GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      } else {
        var6 = 0.375F;
        GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
        GL11.glScalef(var6, var6, var6);
        GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
      }

      if (var21.func_1091_a().func_46058_c()) {
        for (int var25 = 0; var25 <= 1; ++var25) {
          int var24 = var21.func_1091_a().func_27010_f(var21.func_21181_i(), var25);
          float var26 = (float) (var24 >> 16 & 255) / 255.0F;
          float var9 = (float) (var24 >> 8 & 255) / 255.0F;
          var10 = (float) (var24 & 255) / 255.0F;
          GL11.glColor4f(var26, var9, var10, 1.0F);
          this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var21, var25);
        }
      } else {
        this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var21, 0);
      }

      GL11.glPopMatrix();
    }
  }
Exemple #3
0
  public static boolean renderDoorBlock(
      Block par1Block,
      int par2,
      int par3,
      int par4,
      RenderBlocks renderblocks,
      IBlockAccess iblockaccess) {
    Tessellator var5 = Tessellator.instance;
    BlockMTDoor var6 = (BlockMTDoor) par1Block;
    boolean var7 = false;
    float var8 = 0.5F;
    float var9 = 1.0F;
    float var10 = 0.8F;
    float var11 = 0.6F;
    int var12 = par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2, par3, par4);
    var5.setBrightness(
        par1Block.minY > 0.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2, par3 - 1, par4));
    var5.setColorOpaque_F(var8, var8, var8);
    renderblocks.renderBottomFace(
        par1Block,
        (double) par2,
        (double) par3,
        (double) par4,
        par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 0));
    var7 = true;
    var5.setBrightness(
        par1Block.maxY < 1.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2, par3 + 1, par4));
    var5.setColorOpaque_F(var9, var9, var9);
    renderblocks.renderTopFace(
        par1Block,
        (double) par2,
        (double) par3,
        (double) par4,
        par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 1));
    var7 = true;
    var5.setBrightness(
        par1Block.minZ > 0.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2, par3, par4 - 1));
    var5.setColorOpaque_F(var10, var10, var10);
    int var13 = par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 2);

    if (var13 < 0) {
      renderblocks.flipTexture = true;
      var13 = -var13;
    }

    renderblocks.renderEastFace(par1Block, (double) par2, (double) par3, (double) par4, var13);
    var7 = true;
    renderblocks.flipTexture = false;
    var5.setBrightness(
        par1Block.maxZ < 1.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2, par3, par4 + 1));
    var5.setColorOpaque_F(var10, var10, var10);
    var13 = par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 3);

    if (var13 < 0) {
      renderblocks.flipTexture = true;
      var13 = -var13;
    }

    renderblocks.renderWestFace(par1Block, (double) par2, (double) par3, (double) par4, var13);
    var7 = true;
    renderblocks.flipTexture = false;
    var5.setBrightness(
        par1Block.minX > 0.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2 - 1, par3, par4));
    var5.setColorOpaque_F(var11, var11, var11);
    var13 = par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 4);

    if (var13 < 0) {
      renderblocks.flipTexture = true;
      var13 = -var13;
    }

    renderblocks.renderNorthFace(par1Block, (double) par2, (double) par3, (double) par4, var13);
    var7 = true;
    renderblocks.flipTexture = false;
    var5.setBrightness(
        par1Block.maxX < 1.0D
            ? var12
            : par1Block.getMixedBrightnessForBlock(renderblocks.blockAccess, par2 + 1, par3, par4));
    var5.setColorOpaque_F(var11, var11, var11);
    var13 = par1Block.getBlockTexture(renderblocks.blockAccess, par2, par3, par4, 5);

    if (var13 < 0) {
      renderblocks.flipTexture = true;
      var13 = -var13;
    }

    renderblocks.renderSouthFace(par1Block, (double) par2, (double) par3, (double) par4, var13);
    var7 = true;
    renderblocks.flipTexture = false;
    return var7;
  }
  public static boolean renderMagicWorld(
      RenderBlocks renderblocks,
      IBlockAccess iblockaccess,
      int x,
      int y,
      int z,
      MagicSlabBase slab) {
    boolean east = slab.canConnectSlabTo(iblockaccess, x, y, z - 1);
    boolean west = slab.canConnectSlabTo(iblockaccess, x, y, z + 1);
    boolean south = slab.canConnectSlabTo(iblockaccess, x - 1, y, z);
    boolean north = slab.canConnectSlabTo(iblockaccess, x + 1, y, z);
    boolean below = slab.canConnectSlabTo(iblockaccess, x, y - 1, z);
    boolean above = slab.canConnectSlabTo(iblockaccess, x, y + 1, z);

    boolean eastSlab = slab.isSlab(iblockaccess, x, y, z - 1);
    boolean westSlab = slab.isSlab(iblockaccess, x, y, z + 1);
    boolean southSlab = slab.isSlab(iblockaccess, x - 1, y, z);
    boolean northSlab = slab.isSlab(iblockaccess, x + 1, y, z);
    boolean belowSlab = slab.isSlab(iblockaccess, x, y - 1, z);
    boolean aboveSlab = slab.isSlab(iblockaccess, x, y + 1, z);

    byte slabsEast = slab.countNearbyBlocks(iblockaccess, x, y, z - 1);
    byte slabsWest = slab.countNearbyBlocks(iblockaccess, x, y, z + 1);
    byte slabsSouth = slab.countNearbyBlocks(iblockaccess, x - 1, y, z);
    byte slabsNorth = slab.countNearbyBlocks(iblockaccess, x + 1, y, z);
    byte slabsBelow = slab.countNearbyBlocks(iblockaccess, x, y - 1, z);
    byte slabsAbove = slab.countNearbyBlocks(iblockaccess, x, y + 1, z);

    boolean eastTube = slab.checkForTube(iblockaccess, x, y, z - 1);
    boolean westTube = slab.checkForTube(iblockaccess, x, y, z + 1);
    boolean southTube = slab.checkForTube(iblockaccess, x - 1, y, z);
    boolean northTube = slab.checkForTube(iblockaccess, x + 1, y, z);
    boolean belowTube = slab.checkForTube(iblockaccess, x, y - 1, z);
    boolean aboveTube = slab.checkForTube(iblockaccess, x, y + 1, z);

    boolean eastSlabShape = slab.checkForSlabShape(iblockaccess, x, y, z - 1);
    boolean westSlabShape = slab.checkForSlabShape(iblockaccess, x, y, z + 1);
    boolean southSlabShape = slab.checkForSlabShape(iblockaccess, x - 1, y, z);
    boolean northSlabShape = slab.checkForSlabShape(iblockaccess, x + 1, y, z);
    boolean belowSlabShape = slab.checkForSlabShape(iblockaccess, x, y - 1, z);
    boolean aboveSlabShape = slab.checkForSlabShape(iblockaccess, x, y + 1, z);

    float bottomHeight = 0.0F;
    float middleHeight = 0.5F;
    float topHeight = 1.0F;
    float lowOffset = 0.3125F;
    float highOffset = 0.6875F;

    float bX = bottomHeight;
    float bY = bottomHeight;
    float bZ = bottomHeight;
    float tX = topHeight;
    float tY = topHeight;
    float tZ = topHeight;

    byte num = 0;
    num += east ? 1 : 0;
    num += west ? 1 : 0;
    num += south ? 1 : 0;
    num += north ? 1 : 0;
    num += above ? 1 : 0;
    num += below ? 1 : 0;

    byte numSlab = 0;
    numSlab += eastSlab ? 1 : 0;
    numSlab += westSlab ? 1 : 0;
    numSlab += southSlab ? 1 : 0;
    numSlab += northSlab ? 1 : 0;
    numSlab += aboveSlab ? 1 : 0;
    numSlab += belowSlab ? 1 : 0;

    if (num == 0) {
      bX = 0.25F;
      bY = 0.25F;
      bZ = 0.25F;
      tX = 0.75F;
      tY = 0.75F;
      tZ = 0.75F;
    } else if (num == 1) {
      if (below) tY = middleHeight;
      if (above) bY = middleHeight;
      if (south) tX = middleHeight;
      if (north) bX = middleHeight;
      if (east) tZ = middleHeight;
      if (west) bZ = middleHeight;

    } else if (num == 2) {
      // Tubes
      if (below && above) {
        bX = lowOffset;
        bZ = lowOffset;
        tX = highOffset;
        tZ = highOffset;
      } else if (east && west) {
        bX = lowOffset;
        bY = lowOffset;
        tX = highOffset;
        tY = highOffset;
      } else if (north && south) {
        bY = lowOffset;
        bZ = lowOffset;
        tY = highOffset;
        tZ = highOffset;
      } else if (below) {
        if (south) {
          if (southTube) {
            tY = highOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else tY = middleHeight;
          if (belowTube) {
            tX = highOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else {
            tX = middleHeight;
          }
        }

        if (north) {
          if (northTube) {
            tY = highOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else tY = middleHeight;
          if (belowTube) {
            bX = lowOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else bX = middleHeight;
        }

        if (east) {
          if (eastTube) {
            tY = highOffset;
            bX = lowOffset;
            tX = highOffset;
          } else tY = middleHeight;
          if (belowTube) {
            tZ = highOffset;
            bX = lowOffset;
            tX = highOffset;
          } else tZ = middleHeight;
        }

        if (west) {
          if (westTube) {
            tY = highOffset;
            bX = lowOffset;
            tX = highOffset;
          } else tY = middleHeight;
          if (belowTube) {
            bZ = lowOffset;
            bX = lowOffset;
            tX = highOffset;
          } else bZ = middleHeight;
        }

      } else if (above) {
        if (south) {
          if (southTube) {
            bY = lowOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else bY = middleHeight;
          if (aboveTube) {
            tX = highOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else {
            tX = middleHeight;
          }
        }

        if (north) {
          if (northTube) {
            bY = lowOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else bY = middleHeight;
          if (aboveTube) {
            bX = lowOffset;
            bZ = lowOffset;
            tZ = highOffset;
          } else bX = middleHeight;
        }

        if (east) {
          if (eastTube) {
            bY = lowOffset;
            bX = lowOffset;
            tX = highOffset;
          } else bY = middleHeight;
          if (aboveTube) {
            tZ = highOffset;
            bX = lowOffset;
            tX = highOffset;
          } else tZ = middleHeight;
        }

        if (west) {
          if (westTube) {
            bY = lowOffset;
            bX = lowOffset;
            tX = highOffset;
          } else bY = middleHeight;
          if (aboveTube) {
            bZ = lowOffset;
            bX = lowOffset;
            tX = highOffset;
          } else bZ = middleHeight;
        }
      } else if (west && north) {
        if (westTube) {
          bX = lowOffset;
          bY = lowOffset;
          tY = highOffset;
        } else bX = middleHeight;
        if (northTube) {
          bZ = lowOffset;
          bY = lowOffset;
          tY = highOffset;
        } else {
          bZ = middleHeight;
        }
      }

      if (west && south) {
        if (westTube) {
          tX = highOffset;
          bY = lowOffset;
          tY = highOffset;
        } else tX = middleHeight;
        if (southTube) {
          bZ = lowOffset;
          bY = lowOffset;
          tY = highOffset;
        } else {
          bZ = middleHeight;
        }
      } else if (east && north) {
        if (eastTube) {
          bX = lowOffset;
          bY = lowOffset;
          tY = highOffset;
        } else bX = middleHeight;
        if (northTube) {
          tZ = highOffset;
          bY = lowOffset;
          tY = highOffset;
        } else {
          tZ = middleHeight;
        }
      } else if (east && south) {
        if (eastTube) {
          tX = highOffset;
          bY = lowOffset;
          tY = highOffset;
        } else tX = middleHeight;
        if (southTube) {
          tZ = highOffset;
          bY = lowOffset;
          tY = highOffset;
        } else {
          tZ = middleHeight;
        }
      }
    } else if (num == 3) {
      if (below && above) {
        if (north) {
          if (belowTube || aboveTube) bX = lowOffset;
          else bX = middleHeight;
          bZ = lowOffset;
          tZ = highOffset;
        } else if (south) {
          if (belowTube || aboveTube) tX = highOffset;
          else tX = middleHeight;
          bZ = lowOffset;
          tZ = highOffset;
        }

        if (west) {
          bX = lowOffset;
          tX = highOffset;
          if (belowTube || aboveTube) bZ = lowOffset;
          else bZ = middleHeight;
        }

        if (east) {
          bX = lowOffset;
          tX = highOffset;
          if (belowTube || aboveTube) tZ = highOffset;
          else tZ = middleHeight;
        }
      } else if (north && south) {
        if (above) {
          if (northTube || southTube) bY = lowOffset;
          else bY = middleHeight;
          bZ = lowOffset;
          tZ = highOffset;
        } else if (below) {
          if (northTube || southTube) tY = highOffset;
          else tY = middleHeight;
          bZ = lowOffset;
          tZ = highOffset;
        }

        if (west) {
          bY = lowOffset;
          tY = highOffset;
          if (northTube || southTube) bZ = lowOffset;
          else bZ = middleHeight;
        }

        if (east) {
          bY = lowOffset;
          tY = highOffset;
          if (northTube || southTube) tZ = highOffset;
          else tZ = middleHeight;
        }
      } else if (east && west) {
        if (north) {
          if (eastTube || westTube) bX = lowOffset;
          else bX = middleHeight;
          bY = lowOffset;
          tY = highOffset;
        } else if (south) {
          if (eastTube || westTube) tX = highOffset;
          else tX = middleHeight;
          bY = lowOffset;
          tY = highOffset;
        }

        if (above) {
          bX = lowOffset;
          tX = highOffset;
          if (eastTube || westTube) bY = lowOffset;
          else bY = middleHeight;
        }

        if (below) {
          bX = lowOffset;
          tX = highOffset;
          if (eastTube || westTube) tY = highOffset;
          else tY = middleHeight;
        }
      } else if (above) {
        bY = middleHeight;
        if (north) {
          bX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        } else if (south) {
          tX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        }
      } else if (below) {
        tY = middleHeight;
        if (north) {
          bX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        } else if (south) {
          tX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        }
      }
    } else if (num == 4) {
      if (above && below) {
        if (east && west) {
          bX = lowOffset;
          tX = highOffset;
        } else if (north && south) {
          bZ = lowOffset;
          tZ = highOffset;
        } else if (north) {
          bX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        } else if (south) {
          tX = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        }
      } else if (north && south) {
        if (!above && !below) {
          bY = lowOffset;
          tY = highOffset;
        }

        if (above) {
          bY = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        } else if (below) {
          tY = middleHeight;
          if (east) tZ = middleHeight;
          if (west) bZ = middleHeight;
        }
      } else if (east && west) {
        if (above) {
          bY = middleHeight;
          if (south) tX = middleHeight;
          if (north) bX = middleHeight;
        } else if (below) {
          tY = middleHeight;
          if (south) tX = middleHeight;
          if (north) bX = middleHeight;
        }
      }
    } else if (num == 5) {
      if (!below) {
        if (northTube
            || southTube
            || eastTube
            || westTube
            || northSlabShape
            || southSlabShape
            || eastSlabShape
            || westSlabShape) {
          bY = lowOffset;
        } else {
          bY = middleHeight;
        }

        if (slabsAbove == 2) {
          tY = highOffset;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bX = lowOffset;
          tX = highOffset;
          bZ = lowOffset;
          tZ = highOffset;
          bY = highOffset;
          tY = topHeight;
        }
      }
      if (!above) {
        if (northTube
            || southTube
            || eastTube
            || westTube
            || northSlabShape
            || southSlabShape
            || eastSlabShape
            || westSlabShape) {
          tY = highOffset;
        } else {
          tY = middleHeight;
        }

        if (slabsBelow == 2) {
          bY = lowOffset;
          // bY = 0F;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bX = lowOffset;
          tX = highOffset;
          bZ = lowOffset;
          tZ = highOffset;
          tY = lowOffset;
          bY = bottomHeight;
        }
      }
      if (!south) {
        if (aboveTube
            || belowTube
            || eastTube
            || westTube
            || aboveSlabShape
            || belowSlabShape
            || eastSlabShape
            || westSlabShape) {
          bX = lowOffset;
        } else {
          bX = middleHeight;
        }

        if (slabsNorth == 2) {
          tX = highOffset;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bY = lowOffset;
          tY = highOffset;
          bZ = lowOffset;
          tZ = highOffset;
          bX = highOffset;
          tX = topHeight;
        }
      }
      if (!north) {
        // tX = middleHeight;
        if (aboveTube
            || belowTube
            || eastTube
            || westTube
            || aboveSlabShape
            || belowSlabShape
            || eastSlabShape
            || westSlabShape) {
          tX = highOffset;
        } else {
          tX = middleHeight;
        }

        if (slabsSouth == 2) {
          bX = lowOffset;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bY = lowOffset;
          tY = highOffset;
          bZ = lowOffset;
          tZ = highOffset;
          tX = lowOffset;
          bX = bottomHeight;
        }
      }
      if (!east) {
        // bZ = middleHeight;
        if (northTube
            || southTube
            || aboveTube
            || belowTube
            || northSlabShape
            || southSlabShape
            || aboveSlabShape
            || belowSlabShape) {
          bZ = lowOffset;
        } else {
          bZ = middleHeight;
        }

        if (slabsWest == 2) {
          tZ = highOffset;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bY = lowOffset;
          tY = highOffset;
          bX = lowOffset;
          tX = highOffset;
          bZ = highOffset;
          tZ = topHeight;
        }
      }
      if (!west) {
        if (northTube
            || southTube
            || aboveTube
            || belowTube
            || northSlabShape
            || southSlabShape
            || aboveSlabShape
            || belowSlabShape) {
          tZ = highOffset;
        } else {
          tZ = middleHeight;
        }

        if (slabsEast == 2) {
          bZ = lowOffset;
          slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
          renderblocks.renderStandardBlock(slab, x, y, z);

          bX = lowOffset;
          tX = highOffset;
          bY = lowOffset;
          tY = highOffset;
          bZ = bottomHeight;
          tZ = lowOffset;
        }
      }
    }

    slab.setBlockBounds(bX, bY, bZ, tX, tY, tZ);
    renderblocks.renderStandardBlock(slab, x, y, z);
    return false;
  }