@Override /** Renders stairs at the given coordinates */ public void renderCarpentersBlock(int x, int y, int z) { ItemStack coverBlock = BlockProperties.hasCover(TE, 6) == true ? BlockProperties.getCover(TE, coverRendering) : BlockProperties.getCover(TE, 6); renderBancBord(coverBlock, x, y, z); // int data = BlockProperties.getMetadata(TE); // int type = BancD.getType(data); // switch (type) // { // case BancD.BANC_1: // renderBancBord(coverBlock, x, y, z); // break; // case BancD.BANC_2: // renderBancBord_2(coverBlock, x, y, z); // break; // case BancD.BANC_3: // renderBancBorde_3(coverBlock, x, y, z); // break; // case BancD.BANC_4: // renderBancBord_4(coverBlock, x, y, z); // } }
@Override /** Override to provide custom icons. */ protected Icon getUniqueIcon(Block block, int side, Icon icon) { if (isSideSloped) { Slope slope = Slope.slopesList[BlockProperties.getData(TE)]; int metadata = BlockProperties.getCoverMetadata(TE, coverRendering); /* Uncovered sloped oblique faces use triangular frame icons. */ if (!BlockProperties.hasCover(TE, 6)) { if (slope.type.equals(Type.OBLIQUE_INT)) { icon = slope.isPositive ? IconRegistry.icon_slope_oblique_pt_low : IconRegistry.icon_slope_oblique_pt_high; } else if (slope.type.equals(Type.OBLIQUE_EXT)) { icon = slope.isPositive ? IconRegistry.icon_slope_oblique_pt_high : IconRegistry.icon_slope_oblique_pt_low; } } /* For directional blocks, make sure sloped icons match regardless of side. */ if (BlockProperties.blockRotates(TE.worldObj, block, TE.xCoord, TE.yCoord, TE.zCoord)) { if (metadata % 8 == 0) { icon = block.getIcon(slope.isPositive ? 1 : 0, metadata); } else { icon = block.getIcon(2, metadata); } } else if (block instanceof BlockDirectional && !slope.type.equals(Type.WEDGE_Y)) { icon = block.getBlockTextureFromSide(1); } } return icon; }