From ceeadf9e506d4a9ad14cb118c5843a604b088b42 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 28 Jun 2014 00:32:14 +0200 Subject: [PATCH] Delete ActionRobotGoToStation.java Delete duplicate file. --- .../statements/ActionRobotGoToStation.java | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100755 common/buildcraft/silicon/statements/ActionRobotGoToStation.java diff --git a/common/buildcraft/silicon/statements/ActionRobotGoToStation.java b/common/buildcraft/silicon/statements/ActionRobotGoToStation.java deleted file mode 100755 index 74a15f5d..00000000 --- a/common/buildcraft/silicon/statements/ActionRobotGoToStation.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.silicon.statements; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.core.BlockIndex; -import buildcraft.api.gates.ActionParameterItemStack; -import buildcraft.api.gates.IActionParameter; -import buildcraft.api.gates.IGate; -import buildcraft.api.robots.AIRobot; -import buildcraft.api.robots.DockingStationRegistry; -import buildcraft.core.ItemMapLocation; -import buildcraft.core.robots.AIRobotGoAndLinkToDock; -import buildcraft.core.robots.DockingStation; -import buildcraft.core.robots.EntityRobot; -import buildcraft.core.triggers.BCActionActive; -import buildcraft.core.utils.StringUtils; -import buildcraft.transport.Pipe; -import buildcraft.transport.TileGenericPipe; - -public class ActionRobotGotoStation extends BCActionActive { - - public ActionRobotGotoStation() { - super("buildcraft:robot.goto_station"); - } - - @Override - public String getDescription() { - return StringUtils.localize("gate.action.robot.goto_station"); - } - - @Override - public void registerIcons(IIconRegister iconRegister) { - icon = iconRegister.registerIcon("buildcraft:triggers/action_robot_goto_station"); - } - - @Override - public void actionActivate(IGate gate, IActionParameter[] parameters) { - Pipe pipe = (Pipe) gate.getPipe(); - TileGenericPipe tile = pipe.container; - - for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { - DockingStation station = tile.getStation(d); - - if (station != null && station.linked() != null) { - EntityRobot robot = (EntityRobot) station.linked(); - AIRobot ai = robot.getOverridingAI(); - - if (ai != null) { - continue; - } - - DockingStation newStation = station; - - if (parameters[0] != null) { - ActionParameterItemStack stackParam = (ActionParameterItemStack) parameters[0]; - ItemStack item = stackParam.getItemStackToDraw(); - - if (item.getItem() instanceof ItemMapLocation) { - BlockIndex index = ItemMapLocation.getBlockIndex(item); - - if (index != null) { - ForgeDirection side = ItemMapLocation.getSide(item); - DockingStation paramStation = (DockingStation) DockingStationRegistry.getStation(index.x, - index.y, index.z, side); - - if (paramStation != null) { - newStation = paramStation; - } - } - } - } - - robot.overrideAI(new AIRobotGoAndLinkToDock(robot, newStation)); - } - } - } - - @Override - public int maxParameters() { - return 1; - } - - @Override - public IActionParameter createParameter(int index) { - return new ActionParameterItemStack(); - } - -}