public ContainerGateInterface(IInventory playerInventory, Pipe pipe) { super(0); this.playerIInventory = playerInventory; for (int l = 0; l < 3; l++) for (int k1 = 0; k1 < 9; k1++) addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18)); for (int i1 = 0; i1 < 9; i1++) addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 181)); this.pipe = pipe; // Do not attempt to create a list of potential actions and triggers on // the client. if (!CoreProxy.proxy.isRemote(pipe.worldObj)) { _potentialActions.addAll(pipe.getActions()); _potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe)); for (Orientations o : Orientations.dirs()) { Position pos = new Position(pipe.xCoord, pipe.yCoord, pipe.zCoord, o); pos.moveForwards(1.0); TileEntity tile = pipe.worldObj.getBlockTileEntity((int) pos.x, (int) pos.y, (int) pos.z); int blockID = pipe.worldObj.getBlockId((int) pos.x, (int) pos.y, (int) pos.z); Block block = Block.blocksList[blockID]; LinkedList<ITrigger> nearbyTriggers = ActionManager.getNeighborTriggers(block, tile); for (ITrigger t : nearbyTriggers) if (!_potentialTriggers.contains(t)) _potentialTriggers.add(t); LinkedList<IAction> nearbyActions = ActionManager.getNeighborActions(block, tile); for (IAction a : nearbyActions) if (!_potentialActions.contains(a)) _potentialActions.add(a); } } }