Package mods.railcraft.common.carts

Examples of mods.railcraft.common.carts.Train


        EntityPlayer entiyPlayer = (EntityPlayer) player;
        if (entiyPlayer == null)
            return;
        if (!(entiyPlayer.ridingEntity instanceof EntityMinecart))
            return;
        Train train = LinkageManager.instance().getTrain((EntityMinecart) entiyPlayer.ridingEntity);
        if (binding == LOCOMOTIVE_INCREASE_SPEED) {
            for (EntityMinecart cart : train) {
                if (cart instanceof EntityLocomotive) {
                    EntityLocomotive loco = (EntityLocomotive) cart;
                    if (loco.canControl(entiyPlayer.getGameProfile()))
View Full Code Here


        return uuid;
    }

    protected void setCurrentCartAndTrain(EntityMinecart cart) {
        if (lockedCart != cart && lockedCart != null) {
            Train train = LinkageManager.instance().getTrain(lockedCart);
            train.removeLockingTrack(getUUID());
        }
        lockedCart = cart;
        if (cart == null)
            currentTrain = null;
        else
View Full Code Here

            currentTrain = LinkageManager.instance().getTrain(cart);
    }

    protected void lockCart(EntityMinecart cart) {
        if (cart != null) {
            Train train = LinkageManager.instance().getTrain(cart);
            train.addLockingTrack(getUUID());
            MinecraftForge.EVENT_BUS.post(new CartLockdownEvent.Lock(cart, getX(), getY(), getZ()));
            profileInstance.onLock(cart);
        }
    }
View Full Code Here

        }
    }

    protected void releaseCart(EntityMinecart cart) {
        if (cart != null) {
            Train train = LinkageManager.instance().getTrain(cart);
            train.removeLockingTrack(getUUID());
            MinecraftForge.EVENT_BUS.post(new CartLockdownEvent.Release(cart, getX(), getY(), getZ()));
            profileInstance.onRelease(cart);
        }
    }
View Full Code Here

        }
        conditions = stack;
    }

    private boolean canRouteCart(EntityMinecart cart) {
        Train train = LinkageManager.instance().getTrain(cart);
        if (train == null)
            return false;
        if (train.size() == 1)
            return true;
        if (train.isTrainEnd(cart)) {
            if (cart instanceof IRoutableCart)
                return true;
            if (cart instanceof IPaintedCart)
                return true;
            if (cart instanceof IRefuelableCart)
View Full Code Here

TOP

Related Classes of mods.railcraft.common.carts.Train

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.