Package mods.railcraft.api.signals

Examples of mods.railcraft.api.signals.SignalController


                if (Game.isHost(world)) {
                    SignalReceiver receiver = ((IReceiverTile) tile).getReceiver();
                    if (i != cPos.x || j != cPos.y || k != cPos.z) {
                        tile = world.getTileEntity(cPos.x, cPos.y, cPos.z);
                        if (tile != null && tile instanceof IControllerTile) {
                            SignalController controller = ((IControllerTile) tile).getController();
                            if (receiver.getTile() != controller.getTile()) {
                                controller.registerReceiver(receiver);
                                controller.endPairing();
                                ChatPlugin.sendLocalizedChat(player, "railcraft.gui.tuner.success", controller.getName(), receiver.getName());
                                item.setTagCompound(null);
                                return true;
                            }
                        } else if (world.blockExists(cPos.x, cPos.y, cPos.z)) {
                            ChatPlugin.sendLocalizedChat(player, "railcraft.gui.tuner.abandon.gone");
                            item.setTagCompound(null);
                        } else {
                            ChatPlugin.sendLocalizedChat(player, "railcraft.gui.tuner.abandon.chunk");
                            item.setTagCompound(null);
                        }
                    }
                }
            } else if (tile instanceof IControllerTile) {
                if (Game.isHost(world)) {
                    SignalController controller = ((IControllerTile) tile).getController();
                    if (cPos == null || (i != cPos.x || j != cPos.y || k != cPos.z)) {
                        ChatPlugin.sendLocalizedChat(player, "railcraft.gui.tuner.start", controller.getName());
                        setControllerData(item, tile);
                        controller.startPairing();
                    } else {
                        ChatPlugin.sendLocalizedChat(player, "railcraft.gui.tuner.stop", controller.getName());
                        controller.endPairing();
                        item.setTagCompound(null);
                    }
                }
            } else
                return false;
View Full Code Here

TOP

Related Classes of mods.railcraft.api.signals.SignalController

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.