info.texture = new IIcon[6];
}
@Override
public void renderBlock(RenderBlocks renderblocks, IBlockAccess iBlockAccess, int x, int y, int z, Block block) {
TileSignalBase tile = (TileSignalBase) iBlockAccess.getTileEntity(x, y, z);
if (tile == null)
return;
float pix = RenderTools.PIXEL;
int facing = tile.getFacing().ordinal();
if (facing >= info.texture.length)
facing = 0;
// Main
float min = 3 * pix;
float max = 13 * pix;
info.setBlockBounds(min, 6 * pix, min, max, 1, max);
info.texture[0] = BlockSignalRailcraft.texturesSignalSingle[0];
info.texture[1] = BlockSignalRailcraft.texturesSignalSingle[0];
info.texture[2] = BlockSignalRailcraft.texturesSignalSingle[1];
info.texture[3] = BlockSignalRailcraft.texturesSignalSingle[1];
info.texture[4] = BlockSignalRailcraft.texturesSignalSingle[1];
info.texture[5] = BlockSignalRailcraft.texturesSignalSingle[1];
info.texture[facing] = BlockSignalRailcraft.texturesSignalSingle[2];
RenderFakeBlock.renderBlock(info, iBlockAccess, x, y, z, true, false);
// Aspect
SignalAspect aspect = tile.getSignalAspect();
if (!aspect.isLit())
aspect = SignalAspect.OFF;
info.texture[facing] = BlockSignalRailcraft.texturesLampTop[aspect.getTextureIndex()];
info.setRenderSingleSide(facing);
info.brightness = aspect.getTextureBrightness();