Examples of SignalAspect


Examples of mods.railcraft.api.signals.SignalAspect

        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);

        info.brightness = -1;
        info.setRenderAllSides();
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

        info.renderSide[0] = false;
        info.renderSide[1] = false;

        // Aspect
        for (int side = 2; side < 6; side++) {
            SignalAspect aspect = tile.getBoxSignalAspect(ForgeDirection.getOrientation(side));
            if (!aspect.isLit())
                aspect = SignalAspect.OFF;
            IIcon lamp = BlockSignalRailcraft.texturesLampBox[aspect.getTextureIndex()];
            info.texture[2] = lamp;
            info.texture[3] = lamp;
            info.texture[4] = lamp;
            info.texture[5] = lamp;
            info.renderSide[2] = side == 2 && !side2;
            info.renderSide[3] = side == 3 && !side3;
            info.renderSide[4] = side == 4 && !side4;
            info.renderSide[5] = side == 5 && !side5;
            if (!renderblocks.hasOverrideBlockTexture())
                info.brightness = aspect.getTextureBrightness();
            RenderFakeBlock.renderBlock(info, iBlockAccess, x, y, z, (info.brightness < 0), false);
        }
        info.brightness = -1;
        info.setRenderAllSides();
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

            return;
        if (!canChange())
            return;
        changed = true;
        if (button instanceof GuiToggleButton) {
            SignalAspect aspect = SignalAspect.values()[button.id];
            aspects[aspect.ordinal()] = !aspects[aspect.ordinal()];
            ((GuiToggleButton) button).active = aspects[aspect.ordinal()];
        }
    }
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

        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();
        RenderFakeBlock.renderBlock(info, iBlockAccess, x, y, z, (info.brightness < 0), false);
        info.brightness = -1;
        info.setRenderAllSides();
        info.texture[facing] = BlockSignalRailcraft.texturesSignalSingle[2];
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

                }
            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

Examples of mods.railcraft.api.signals.SignalAspect

            }
            return;
        }
        controller.tickServer();
        signalBlock.tickServer();
        SignalAspect prevAspect = controller.getAspect();
        if (controller.isBeingPaired())
            controller.setAspect(SignalAspect.BLINK_YELLOW);
        else
            controller.setAspect(signalBlock.getSignalAspect());
        if (prevAspect != controller.getAspect()) {
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

        if (Game.isNotHost(worldObj)) {
            receiver.tickClient();
            return;
        }
        receiver.tickServer();
        SignalAspect prevAspect = receiver.getAspect();
        if (receiver.isBeingPaired()) {
            receiver.setAspect(SignalAspect.BLINK_YELLOW);
        } else if (!receiver.isPaired()) {
            receiver.setAspect(SignalAspect.BLINK_RED);
        }
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

    protected SignalAspect determineAspect(WorldCoordinate otherCoord) {
        if (isWaitingForRetest() || isBeingPaired())
            return SignalAspect.BLINK_YELLOW;
        if (!isPaired())
            return SignalAspect.BLINK_RED;
        SignalAspect otherAspect = SignalAspect.GREEN;
        SignalBlock other = getSignalAt(otherCoord);
        if (other != null)
            otherAspect = other.getSignalAspectForPair(getCoords());
        SignalAspect myAspect = determineMyAspect(otherCoord);
        return SignalAspect.mostRestrictive(myAspect, otherAspect);
    }
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

        int zOffset = otherTrack.z > myTrack.z ? -3 : 3;

        List<EntityMinecart> carts = CartTools.getMinecartsIn(tile.getWorldObj(), x1, y1, z1, x2, y2, z2);
//        System.out.printf("%d, %d, %d, %d, %d, %d\n", i1, j1, k1, i2, j2, k2);
//        System.out.println("carts = " + carts.size());
        SignalAspect newAspect = SignalAspect.GREEN;
        for (EntityMinecart cart : carts) {
            int cartX = MathHelper.floor_double(cart.posX);
            int cartZ = MathHelper.floor_double(cart.posZ);
            if (Math.abs(cart.motionX) < 0.08 && Math.abs(cart.motionZ) < 0.08)
                return SignalAspect.RED;
View Full Code Here

Examples of mods.railcraft.api.signals.SignalAspect

                markBlockForUpdate();
            }
            return;
        }
        receiver.tickServer();
        SignalAspect prevAspect = receiver.getAspect();
        if (receiver.isBeingPaired())
            receiver.setAspect(SignalAspect.BLINK_YELLOW);
        else if (!receiver.isPaired())
            receiver.setAspect(SignalAspect.BLINK_RED);
        if (prevAspect != receiver.getAspect()) {
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.