Examples of canControl()


Examples of mods.railcraft.common.carts.EntityLocomotive.canControl()

        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()))
                        loco.increaseSpeed();
                }
            }
        } else if (binding == LOCOMOTIVE_DECREASE_SPEED) {
            for (EntityMinecart cart : train) {
View Full Code Here

Examples of mods.railcraft.common.carts.EntityLocomotive.canControl()

            }
        } else if (binding == LOCOMOTIVE_DECREASE_SPEED) {
            for (EntityMinecart cart : train) {
                if (cart instanceof EntityLocomotive) {
                    EntityLocomotive loco = (EntityLocomotive) cart;
                    if (loco.canControl(entiyPlayer.getGameProfile()))
                        loco.decreaseSpeed();
                }
            }
        } else if (binding == LOCOMOTIVE_MODE_CHANGE) {
            for (EntityMinecart cart : train) {
View Full Code Here

Examples of mods.railcraft.common.carts.EntityLocomotive.canControl()

            }
        } else if (binding == LOCOMOTIVE_MODE_CHANGE) {
            for (EntityMinecart cart : train) {
                if (cart instanceof EntityLocomotive) {
                    EntityLocomotive loco = (EntityLocomotive) cart;
                    if (loco.canControl(entiyPlayer.getGameProfile())) {
                        LocoMode mode = loco.getMode();
                        if (mode == LocoMode.RUNNING)
                            loco.setMode(LocoMode.IDLE);
                        else
                            loco.setMode(LocoMode.RUNNING);
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.