removed duplicated code in statements
This commit is contained in:
parent
3c409ca0b9
commit
cb68a5c563
30 changed files with 13 additions and 279 deletions
|
@ -10,7 +10,6 @@ package buildcraft.builders.triggers;
|
||||||
|
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.builders.filler.pattern.FillerPattern;
|
import buildcraft.builders.filler.pattern.FillerPattern;
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
|
|
||||||
|
@ -32,9 +31,4 @@ public class ActionFiller extends BCAction {
|
||||||
public IIcon getIcon() {
|
public IIcon getIcon() {
|
||||||
return pattern.getIcon();
|
return pattern.getIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ package buildcraft.core.triggers;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
public class ActionMachineControl extends BCAction {
|
public class ActionMachineControl extends BCAction {
|
||||||
|
@ -44,9 +43,4 @@ public class ActionMachineControl extends BCAction {
|
||||||
return StatementIconProvider.Action_MachineControl_Loop;
|
return StatementIconProvider.Action_MachineControl_Loop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
package buildcraft.core.triggers;
|
package buildcraft.core.triggers;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.api.gates.IActionParameter;
|
import buildcraft.api.gates.IActionParameter;
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -19,17 +17,10 @@ import buildcraft.transport.Pipe;
|
||||||
|
|
||||||
public class ActionPipeClose extends BCAction {
|
public class ActionPipeClose extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionPipeClose() {
|
public ActionPipeClose() {
|
||||||
super("buildcraft:pipe.close");
|
super("buildcraft:pipe.close");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.pipe.close");
|
return StringUtils.localize("gate.action.pipe.close");
|
||||||
|
@ -40,11 +31,6 @@ public class ActionPipeClose extends BCAction {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_pipe_close");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_pipe_close");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
||||||
((Pipe) gate.getPipe()).close();
|
((Pipe) gate.getPipe()).close();
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.core.triggers;
|
package buildcraft.core.triggers;
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
|
|
||||||
public class ActionRedstoneOutput extends BCAction {
|
public class ActionRedstoneOutput extends BCAction {
|
||||||
|
|
||||||
|
@ -25,9 +24,4 @@ public class ActionRedstoneOutput extends BCAction {
|
||||||
public int getIconIndex() {
|
public int getIconIndex() {
|
||||||
return StatementIconProvider.Trigger_RedstoneInput_Active;
|
return StatementIconProvider.Trigger_RedstoneInput_Active;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,4 @@ public abstract class BCAction extends BCStatement implements IAction {
|
||||||
@Override
|
@Override
|
||||||
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ public abstract class BCStatement implements IStatement {
|
||||||
|
|
||||||
protected final String uniqueTag;
|
protected final String uniqueTag;
|
||||||
|
|
||||||
|
protected IIcon icon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UniqueTag accepts multiple possible tags, use this feature to migrate to
|
* UniqueTag accepts multiple possible tags, use this feature to migrate to
|
||||||
* more standardized tags if needed, otherwise just pass a single string.
|
* more standardized tags if needed, otherwise just pass a single string.
|
||||||
|
@ -47,7 +49,11 @@ public abstract class BCStatement implements IStatement {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon() {
|
public IIcon getIcon() {
|
||||||
return StatementIconProvider.INSTANCE.getIcon(getIconIndex());
|
if (icon != null) {
|
||||||
|
return icon;
|
||||||
|
} else {
|
||||||
|
return StatementIconProvider.INSTANCE.getIcon(getIconIndex());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -70,4 +76,9 @@ public abstract class BCStatement implements IStatement {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IStatement rotateLeft() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,9 +51,4 @@ public abstract class BCTrigger extends BCStatement implements ITrigger {
|
||||||
public ITriggerParameter createParameter(int index) {
|
public ITriggerParameter createParameter(int index) {
|
||||||
return new TriggerParameterItemStack();
|
return new TriggerParameterItemStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
|
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
|
@ -119,9 +118,4 @@ public class TriggerFluidContainer extends BCTrigger {
|
||||||
return StatementIconProvider.Trigger_FluidContainer_Full;
|
return StatementIconProvider.Trigger_FluidContainer_Full;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
|
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
|
@ -102,9 +101,4 @@ public class TriggerFluidContainerLevel extends BCTrigger {
|
||||||
return StatementIconProvider.Trigger_FluidContainer_Below75;
|
return StatementIconProvider.Trigger_FluidContainer_Below75;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import buildcraft.api.core.IInvSlot;
|
import buildcraft.api.core.IInvSlot;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.inventory.InventoryIterator;
|
import buildcraft.core.inventory.InventoryIterator;
|
||||||
import buildcraft.core.inventory.StackHelper;
|
import buildcraft.core.inventory.StackHelper;
|
||||||
|
@ -101,9 +100,4 @@ public class TriggerInventory extends BCTrigger {
|
||||||
return StatementIconProvider.Trigger_Inventory_Full;
|
return StatementIconProvider.Trigger_Inventory_Full;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import buildcraft.api.core.IInvSlot;
|
import buildcraft.api.core.IInvSlot;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.inventory.InventoryIterator;
|
import buildcraft.core.inventory.InventoryIterator;
|
||||||
import buildcraft.core.inventory.StackHelper;
|
import buildcraft.core.inventory.StackHelper;
|
||||||
|
@ -101,9 +100,4 @@ public class TriggerInventoryLevel extends BCTrigger {
|
||||||
return StatementIconProvider.Trigger_Inventory_Below75;
|
return StatementIconProvider.Trigger_Inventory_Below75;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.IMachine;
|
import buildcraft.core.IMachine;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -55,9 +54,4 @@ public class TriggerMachine extends BCTrigger {
|
||||||
return StatementIconProvider.Trigger_Machine_Inactive;
|
return StatementIconProvider.Trigger_Machine_Inactive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
package buildcraft.core.triggers;
|
package buildcraft.core.triggers;
|
||||||
|
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
import buildcraft.transport.Pipe;
|
import buildcraft.transport.Pipe;
|
||||||
|
@ -41,9 +40,4 @@ public class TriggerRedstoneInput extends BCTrigger {
|
||||||
public int getIconIndex() {
|
public int getIconIndex() {
|
||||||
return active ? StatementIconProvider.Trigger_RedstoneInput_Active : StatementIconProvider.Trigger_RedstoneInput_Inactive;
|
return active ? StatementIconProvider.Trigger_RedstoneInput_Active : StatementIconProvider.Trigger_RedstoneInput_Inactive;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,12 @@ import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.triggers.BCTrigger;
|
import buildcraft.core.triggers.BCTrigger;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -29,8 +27,6 @@ import buildcraft.energy.TileEngine.EnergyStage;
|
||||||
public class TriggerEngineHeat extends BCTrigger {
|
public class TriggerEngineHeat extends BCTrigger {
|
||||||
|
|
||||||
public EnergyStage stage;
|
public EnergyStage stage;
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public TriggerEngineHeat(EnergyStage stage) {
|
public TriggerEngineHeat(EnergyStage stage) {
|
||||||
super("buildcraft:engine.stage." + stage.name().toLowerCase(Locale.ENGLISH), "buildcraft.engine.stage." + stage.name().toLowerCase(Locale.ENGLISH));
|
super("buildcraft:engine.stage." + stage.name().toLowerCase(Locale.ENGLISH), "buildcraft.engine.stage." + stage.name().toLowerCase(Locale.ENGLISH));
|
||||||
|
@ -54,20 +50,9 @@ public class TriggerEngineHeat extends BCTrigger {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_engineheat_" + stage.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_engineheat_" + stage.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,11 @@ package buildcraft.silicon.statements;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import buildcraft.api.core.BlockIndex;
|
import buildcraft.api.core.BlockIndex;
|
||||||
import buildcraft.api.gates.ActionParameterItemStack;
|
import buildcraft.api.gates.ActionParameterItemStack;
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.api.gates.IActionParameter;
|
import buildcraft.api.gates.IActionParameter;
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.robots.AIRobot;
|
import buildcraft.api.robots.AIRobot;
|
||||||
|
@ -32,17 +30,10 @@ import buildcraft.transport.TileGenericPipe;
|
||||||
|
|
||||||
public class ActionRobotGoToStation extends BCAction {
|
public class ActionRobotGoToStation extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionRobotGoToStation() {
|
public ActionRobotGoToStation() {
|
||||||
super("buildcraft:robot.goto_station");
|
super("buildcraft:robot.goto_station");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.robot.goto_station");
|
return StringUtils.localize("gate.action.robot.goto_station");
|
||||||
|
@ -53,11 +44,6 @@ public class ActionRobotGoToStation extends BCAction {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_robot_goto_station");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_robot_goto_station");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
public void actionActivate(IGate gate, IActionParameter[] parameters) {
|
||||||
Pipe<?> pipe = (Pipe<?>) gate.getPipe();
|
Pipe<?> pipe = (Pipe<?>) gate.getPipe();
|
||||||
|
|
|
@ -10,7 +10,6 @@ package buildcraft.silicon.statements;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
@ -27,17 +26,10 @@ import buildcraft.transport.TileGenericPipe;
|
||||||
|
|
||||||
public class ActionRobotWorkInArea extends BCAction {
|
public class ActionRobotWorkInArea extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionRobotWorkInArea() {
|
public ActionRobotWorkInArea() {
|
||||||
super("buildcraft:robot.work_in_area");
|
super("buildcraft:robot.work_in_area");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.robot.work_in_area");
|
return StringUtils.localize("gate.action.robot.work_in_area");
|
||||||
|
|
|
@ -12,10 +12,8 @@ import java.util.LinkedList;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.ActionParameterItemStack;
|
import buildcraft.api.gates.ActionParameterItemStack;
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.api.gates.IActionParameter;
|
import buildcraft.api.gates.IActionParameter;
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
|
@ -24,17 +22,10 @@ import buildcraft.transport.Pipe;
|
||||||
|
|
||||||
public class ActionStationProvideItems extends BCAction {
|
public class ActionStationProvideItems extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionStationProvideItems() {
|
public ActionStationProvideItems() {
|
||||||
super("buildcraft:station.provide_items");
|
super("buildcraft:station.provide_items");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.station.provide_items");
|
return StringUtils.localize("gate.action.station.provide_items");
|
||||||
|
@ -45,11 +36,6 @@ public class ActionStationProvideItems extends BCAction {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_station_provide_items");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_station_provide_items");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int maxParameters() {
|
public int maxParameters() {
|
||||||
return 3;
|
return 3;
|
||||||
|
|
|
@ -12,10 +12,8 @@ import java.util.LinkedList;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.ActionParameterItemStack;
|
import buildcraft.api.gates.ActionParameterItemStack;
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.api.gates.IActionParameter;
|
import buildcraft.api.gates.IActionParameter;
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
|
@ -24,17 +22,10 @@ import buildcraft.transport.Pipe;
|
||||||
|
|
||||||
public class ActionStationRequestItems extends BCAction {
|
public class ActionStationRequestItems extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionStationRequestItems() {
|
public ActionStationRequestItems() {
|
||||||
super("buildcraft:station.request_items");
|
super("buildcraft:station.request_items");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.station.request_items");
|
return StringUtils.localize("gate.action.station.request_items");
|
||||||
|
@ -45,11 +36,6 @@ public class ActionStationRequestItems extends BCAction {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_station_request_items");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_station_request_items");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int maxParameters() {
|
public int maxParameters() {
|
||||||
return 3;
|
return 3;
|
||||||
|
|
|
@ -9,25 +9,16 @@
|
||||||
package buildcraft.transport.triggers;
|
package buildcraft.transport.triggers;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
public class ActionEnergyPulsar extends BCAction {
|
public class ActionEnergyPulsar extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionEnergyPulsar() {
|
public ActionEnergyPulsar() {
|
||||||
super("buildcraft:pulsar.constant", "buildcraft.pulser.constant");
|
super("buildcraft:pulsar.constant", "buildcraft.pulser.constant");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.pulsar.constant");
|
return StringUtils.localize("gate.action.pulsar.constant");
|
||||||
|
@ -37,9 +28,4 @@ public class ActionEnergyPulsar extends BCAction {
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_pulsar");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_pulsar");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,7 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.core.utils.EnumColor;
|
import buildcraft.core.utils.EnumColor;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -21,7 +19,6 @@ import buildcraft.core.utils.StringUtils;
|
||||||
public class ActionExtractionPreset extends BCAction {
|
public class ActionExtractionPreset extends BCAction {
|
||||||
|
|
||||||
public final EnumColor color;
|
public final EnumColor color;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionExtractionPreset(EnumColor color) {
|
public ActionExtractionPreset(EnumColor color) {
|
||||||
super("buildcraft:extraction.preset." + color.getTag(), "buildcraft.extraction.preset." + color.getTag());
|
super("buildcraft:extraction.preset." + color.getTag(), "buildcraft.extraction.preset." + color.getTag());
|
||||||
|
@ -34,18 +31,8 @@ public class ActionExtractionPreset extends BCAction {
|
||||||
return String.format(StringUtils.localize("gate.action.extraction"), color.getName());
|
return String.format(StringUtils.localize("gate.action.extraction"), color.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/extraction_preset_" + color.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/extraction_preset_" + color.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,7 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.core.utils.EnumColor;
|
import buildcraft.core.utils.EnumColor;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -21,7 +19,6 @@ import buildcraft.core.utils.StringUtils;
|
||||||
public class ActionPipeColor extends BCAction {
|
public class ActionPipeColor extends BCAction {
|
||||||
|
|
||||||
public final EnumColor color;
|
public final EnumColor color;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionPipeColor(EnumColor color) {
|
public ActionPipeColor(EnumColor color) {
|
||||||
super("buildcraft:pipe.color." + color.getTag(), "buildcraft.pipe." + color.getTag());
|
super("buildcraft:pipe.color." + color.getTag(), "buildcraft.pipe." + color.getTag());
|
||||||
|
@ -34,18 +31,8 @@ public class ActionPipeColor extends BCAction {
|
||||||
return String.format(StringUtils.localize("gate.action.pipe.item.color"), color.getLocalizedName());
|
return String.format(StringUtils.localize("gate.action.pipe.item.color"), color.getLocalizedName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/color_" + color.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/color_" + color.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
@ -22,7 +21,6 @@ import buildcraft.core.triggers.BCAction;
|
||||||
public class ActionPipeDirection extends BCAction {
|
public class ActionPipeDirection extends BCAction {
|
||||||
|
|
||||||
public final ForgeDirection direction;
|
public final ForgeDirection direction;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionPipeDirection(ForgeDirection direction) {
|
public ActionPipeDirection(ForgeDirection direction) {
|
||||||
super("buildcraft:pipe.dir." + direction.name().toLowerCase(Locale.ENGLISH), "buildcraft.pipe.dir." + direction.name().toLowerCase(Locale.ENGLISH));
|
super("buildcraft:pipe.dir." + direction.name().toLowerCase(Locale.ENGLISH), "buildcraft.pipe.dir." + direction.name().toLowerCase(Locale.ENGLISH));
|
||||||
|
@ -35,11 +33,6 @@ public class ActionPipeDirection extends BCAction {
|
||||||
return direction.name().substring(0, 1) + direction.name().substring(1).toLowerCase(Locale.ENGLISH) + " Pipe Direction";
|
return direction.name().substring(0, 1) + direction.name().substring(1).toLowerCase(Locale.ENGLISH) + " Pipe Direction";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_dir_" + direction.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_dir_" + direction.name().toLowerCase(Locale.ENGLISH));
|
||||||
|
|
|
@ -11,16 +11,13 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.transport.pipes.PipePowerIron.PowerMode;
|
import buildcraft.transport.pipes.PipePowerIron.PowerMode;
|
||||||
|
|
||||||
public class ActionPowerLimiter extends BCAction {
|
public class ActionPowerLimiter extends BCAction {
|
||||||
|
|
||||||
public final PowerMode limit;
|
public final PowerMode limit;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionPowerLimiter(PowerMode limit) {
|
public ActionPowerLimiter(PowerMode limit) {
|
||||||
super("buildcraft:power.limiter." + limit.name().toLowerCase(Locale.ENGLISH), "buildcraft.power.limiter." + limit.name().toLowerCase(Locale.ENGLISH));
|
super("buildcraft:power.limiter." + limit.name().toLowerCase(Locale.ENGLISH), "buildcraft.power.limiter." + limit.name().toLowerCase(Locale.ENGLISH));
|
||||||
|
@ -33,18 +30,8 @@ public class ActionPowerLimiter extends BCAction {
|
||||||
return limit.maxPower + " MJ/t Limit";
|
return limit.maxPower + " MJ/t Limit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_limiter_" + limit.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_limiter_" + limit.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,12 @@ import net.minecraft.util.IIcon;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
public class ActionRedstoneFaderOutput extends BCAction {
|
public class ActionRedstoneFaderOutput extends BCAction {
|
||||||
|
|
||||||
public final int level;
|
public final int level;
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionRedstoneFaderOutput(int level) {
|
public ActionRedstoneFaderOutput(int level) {
|
||||||
super(String.format("buildcraft:redstone.output.%02d", level));
|
super(String.format("buildcraft:redstone.output.%02d", level));
|
||||||
|
@ -46,9 +43,4 @@ public class ActionRedstoneFaderOutput extends BCAction {
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
|
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ package buildcraft.transport.triggers;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.api.gates.IActionParameter;
|
import buildcraft.api.gates.IActionParameter;
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.transport.PipeWire;
|
import buildcraft.api.transport.PipeWire;
|
||||||
|
@ -49,11 +48,6 @@ public class ActionSignalOutput extends BCAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int maxParameters() {
|
public int maxParameters() {
|
||||||
return 3;
|
return 3;
|
||||||
|
|
|
@ -9,25 +9,16 @@
|
||||||
package buildcraft.transport.triggers;
|
package buildcraft.transport.triggers;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import buildcraft.api.gates.IAction;
|
|
||||||
import buildcraft.core.triggers.BCAction;
|
import buildcraft.core.triggers.BCAction;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
public class ActionSingleEnergyPulse extends BCAction {
|
public class ActionSingleEnergyPulse extends BCAction {
|
||||||
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public ActionSingleEnergyPulse() {
|
public ActionSingleEnergyPulse() {
|
||||||
super("buildcraft:pulsar.single", "buildcraft.pulser.single");
|
super("buildcraft:pulsar.single", "buildcraft.pulser.single");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return StringUtils.localize("gate.action.pulsar.single");
|
return StringUtils.localize("gate.action.pulsar.single");
|
||||||
|
@ -37,9 +28,4 @@ public class ActionSingleEnergyPulse extends BCAction {
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/action_single_pulsar");
|
icon = iconRegister.registerIcon("buildcraft:triggers/action_single_pulsar");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAction rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.core.triggers.BCTrigger;
|
import buildcraft.core.triggers.BCTrigger;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@ public class TriggerClockTimer extends BCTrigger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public final Time time;
|
public final Time time;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public TriggerClockTimer(Time time) {
|
public TriggerClockTimer(Time time) {
|
||||||
super("buildcraft:timer." + time.name().toLowerCase(Locale.ENGLISH));
|
super("buildcraft:timer." + time.name().toLowerCase(Locale.ENGLISH));
|
||||||
|
@ -37,11 +35,6 @@ public class TriggerClockTimer extends BCTrigger {
|
||||||
this.time = time;
|
this.time = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return String.format(StringUtils.localize("gate.trigger.timer"), time.delay);
|
return String.format(StringUtils.localize("gate.trigger.timer"), time.delay);
|
||||||
|
@ -51,9 +44,4 @@ public class TriggerClockTimer extends BCTrigger {
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_" + time.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_" + time.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
@ -22,7 +21,6 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
|
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.triggers.BCTrigger;
|
import buildcraft.core.triggers.BCTrigger;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -46,7 +44,6 @@ public class TriggerPipeContents extends BCTrigger {
|
||||||
public BCTrigger trigger;
|
public BCTrigger trigger;
|
||||||
};
|
};
|
||||||
private PipeContents kind;
|
private PipeContents kind;
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public TriggerPipeContents(PipeContents kind) {
|
public TriggerPipeContents(PipeContents kind) {
|
||||||
super("buildcraft:pipe.contents." + kind.name().toLowerCase(Locale.ENGLISH), "buildcraft.pipe.contents." + kind.name());
|
super("buildcraft:pipe.contents." + kind.name().toLowerCase(Locale.ENGLISH), "buildcraft.pipe.contents." + kind.name());
|
||||||
|
@ -152,19 +149,9 @@ public class TriggerPipeContents extends BCTrigger {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_pipecontents_" + kind.name().toLowerCase(Locale.ENGLISH));
|
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_pipecontents_" + kind.name().toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.api.transport.PipeWire;
|
import buildcraft.api.transport.PipeWire;
|
||||||
import buildcraft.core.triggers.BCTrigger;
|
import buildcraft.core.triggers.BCTrigger;
|
||||||
|
@ -106,11 +105,6 @@ public class TriggerPipeSignal extends BCTrigger {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITriggerParameter createParameter(int index) {
|
public ITriggerParameter createParameter(int index) {
|
||||||
return new TriggerParameterSignal();
|
return new TriggerParameterSignal();
|
||||||
|
|
|
@ -9,13 +9,11 @@
|
||||||
package buildcraft.transport.triggers;
|
package buildcraft.transport.triggers;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import buildcraft.api.gates.IGate;
|
import buildcraft.api.gates.IGate;
|
||||||
import buildcraft.api.gates.ITrigger;
|
|
||||||
import buildcraft.api.gates.ITriggerParameter;
|
import buildcraft.api.gates.ITriggerParameter;
|
||||||
import buildcraft.core.triggers.BCTrigger;
|
import buildcraft.core.triggers.BCTrigger;
|
||||||
import buildcraft.core.utils.StringUtils;
|
import buildcraft.core.utils.StringUtils;
|
||||||
|
@ -24,8 +22,6 @@ import buildcraft.transport.TileGenericPipe;
|
||||||
public class TriggerRedstoneFaderInput extends BCTrigger {
|
public class TriggerRedstoneFaderInput extends BCTrigger {
|
||||||
|
|
||||||
public final int level;
|
public final int level;
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon icon;
|
|
||||||
|
|
||||||
public TriggerRedstoneFaderInput(int level) {
|
public TriggerRedstoneFaderInput(int level) {
|
||||||
super(String.format("buildcraft:redtone.input.%02d", level));
|
super(String.format("buildcraft:redtone.input.%02d", level));
|
||||||
|
@ -43,20 +39,9 @@ public class TriggerRedstoneFaderInput extends BCTrigger {
|
||||||
return ((TileGenericPipe) gate.getPipe().getTile()).redstoneInput == level;
|
return ((TileGenericPipe) gate.getPipe().getTile()).redstoneInput == level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon() {
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
|
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITrigger rotateLeft() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue