Examples of IDualHeadSignal


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

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

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

                        ChatPlugin.sendLocalizedChat(player, returnState.message, pats.toString());
                }
            returnValue = true;
        }
        if (t instanceof IDualHeadSignal) {
            IDualHeadSignal signal = (IDualHeadSignal) t;
            SignalAspect top = signal.getTopAspect();
            SignalAspect bottom = signal.getBottomAspect();
            ChatPlugin.sendLocalizedChat(player, "railcraft.gui.mag.glass.aspect.dual", top.getLocalizationTag(), bottom.getLocalizationTag());
            returnValue = true;
        } else if (t instanceof TileSignalBase) {
            ChatPlugin.sendLocalizedChat(player, "railcraft.gui.mag.glass.aspect", ((TileSignalBase) t).getSignalAspect().getLocalizationTag());
            returnValue = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.