Package mods.railcraft.common.blocks.signals

Examples of mods.railcraft.common.blocks.signals.TileSignalBase


        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();
View Full Code Here

TOP

Related Classes of mods.railcraft.common.blocks.signals.TileSignalBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.