info.template = RailcraftBlocks.getBlockSignal();
}
@Override
public void renderBlock(RenderBlocks renderblocks, IBlockAccess world, int x, int y, int z, Block block) {
IDualHeadSignal tile = (IDualHeadSignal) world.getTileEntity(x, y, z);
int facing = tile.getFacing().ordinal();
float pix = RenderTools.PIXEL;
float f = 3.0F * pix;
float f1 = 13.0F * pix;
info.setBlockBounds(f, 0, f, f1, 1, f1);
info.texture[0] = BlockSignalRailcraft.texturesSignalDual[0];
info.texture[1] = BlockSignalRailcraft.texturesSignalDual[0];
info.texture[2] = BlockSignalRailcraft.texturesSignalDual[1];
info.texture[3] = BlockSignalRailcraft.texturesSignalDual[1];
info.texture[4] = BlockSignalRailcraft.texturesSignalDual[1];
info.texture[5] = BlockSignalRailcraft.texturesSignalDual[1];
info.texture[facing] = BlockSignalRailcraft.texturesSignalDual[2];
RenderFakeBlock.renderBlock(info, world, x, y, z, true, false);
// Render Aspect
info.setRenderSingleSide(facing);
SignalAspect aspect = tile.getTopAspect();
if (!aspect.isLit())
aspect = SignalAspect.OFF;
info.texture[facing] = BlockSignalRailcraft.texturesLampTop[aspect.getTextureIndex()];
info.brightness = aspect.getTextureBrightness();
RenderFakeBlock.renderBlock(info, world, x, y, z, info.brightness < 0 ? true : false, false);
aspect = tile.getBottomAspect();
if (!aspect.isLit())
aspect = SignalAspect.OFF;
info.texture[facing] = BlockSignalRailcraft.texturesLampBottom[aspect.getTextureIndex()];
info.brightness = aspect.getTextureBrightness();
RenderFakeBlock.renderBlock(info, world, x, y, z, info.brightness < 0 ? true : false, false);