removed duplicated code in statements

This commit is contained in:
SpaceToad 2014-06-26 08:59:04 +02:00
parent 3c409ca0b9
commit cb68a5c563
30 changed files with 13 additions and 279 deletions

View file

@ -10,7 +10,6 @@ package buildcraft.builders.triggers;
import net.minecraft.util.IIcon;
import buildcraft.api.gates.IAction;
import buildcraft.builders.filler.pattern.FillerPattern;
import buildcraft.core.triggers.BCAction;
@ -32,9 +31,4 @@ public class ActionFiller extends BCAction {
public IIcon getIcon() {
return pattern.getIcon();
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -10,7 +10,6 @@ package buildcraft.core.triggers;
import java.util.Locale;
import buildcraft.api.gates.IAction;
import buildcraft.core.utils.StringUtils;
public class ActionMachineControl extends BCAction {
@ -44,9 +43,4 @@ public class ActionMachineControl extends BCAction {
return StatementIconProvider.Action_MachineControl_Loop;
}
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -9,9 +9,7 @@
package buildcraft.core.triggers;
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.IGate;
import buildcraft.core.utils.StringUtils;
@ -19,17 +17,10 @@ import buildcraft.transport.Pipe;
public class ActionPipeClose extends BCAction {
private IIcon icon;
public ActionPipeClose() {
super("buildcraft:pipe.close");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.pipe.close");
@ -40,11 +31,6 @@ public class ActionPipeClose extends BCAction {
icon = iconRegister.registerIcon("buildcraft:triggers/action_pipe_close");
}
@Override
public IAction rotateLeft() {
return this;
}
@Override
public void actionActivate(IGate gate, IActionParameter[] parameters) {
((Pipe) gate.getPipe()).close();

View file

@ -8,7 +8,6 @@
*/
package buildcraft.core.triggers;
import buildcraft.api.gates.IAction;
public class ActionRedstoneOutput extends BCAction {
@ -25,9 +24,4 @@ public class ActionRedstoneOutput extends BCAction {
public int getIconIndex() {
return StatementIconProvider.Trigger_RedstoneInput_Active;
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -26,9 +26,4 @@ public abstract class BCAction extends BCStatement implements IAction {
@Override
public void actionActivate(IGate gate, IActionParameter[] parameters) {
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -21,6 +21,8 @@ public abstract class BCStatement implements IStatement {
protected final String uniqueTag;
protected IIcon icon;
/**
* UniqueTag accepts multiple possible tags, use this feature to migrate to
* more standardized tags if needed, otherwise just pass a single string.
@ -47,7 +49,11 @@ public abstract class BCStatement implements IStatement {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon() {
return StatementIconProvider.INSTANCE.getIcon(getIconIndex());
if (icon != null) {
return icon;
} else {
return StatementIconProvider.INSTANCE.getIcon(getIconIndex());
}
}
@Override
@ -70,4 +76,9 @@ public abstract class BCStatement implements IStatement {
return "";
}
@Override
public IStatement rotateLeft() {
return this;
}
}

View file

@ -51,9 +51,4 @@ public abstract class BCTrigger extends BCStatement implements ITrigger {
public ITriggerParameter createParameter(int index) {
return new TriggerParameterItemStack();
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -18,7 +18,6 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.utils.StringUtils;
@ -119,9 +118,4 @@ public class TriggerFluidContainer extends BCTrigger {
return StatementIconProvider.Trigger_FluidContainer_Full;
}
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -18,7 +18,6 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.utils.StringUtils;
@ -102,9 +101,4 @@ public class TriggerFluidContainerLevel extends BCTrigger {
return StatementIconProvider.Trigger_FluidContainer_Below75;
}
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -17,7 +17,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.IInvSlot;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.inventory.InventoryIterator;
import buildcraft.core.inventory.StackHelper;
@ -101,9 +100,4 @@ public class TriggerInventory extends BCTrigger {
return StatementIconProvider.Trigger_Inventory_Full;
}
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -17,7 +17,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.IInvSlot;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.inventory.InventoryIterator;
import buildcraft.core.inventory.StackHelper;
@ -101,9 +100,4 @@ public class TriggerInventoryLevel extends BCTrigger {
return StatementIconProvider.Trigger_Inventory_Below75;
}
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -12,7 +12,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.IMachine;
import buildcraft.core.utils.StringUtils;
@ -55,9 +54,4 @@ public class TriggerMachine extends BCTrigger {
return StatementIconProvider.Trigger_Machine_Inactive;
}
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -9,7 +9,6 @@
package buildcraft.core.triggers;
import buildcraft.api.gates.IGate;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.utils.StringUtils;
import buildcraft.transport.Pipe;
@ -41,9 +40,4 @@ public class TriggerRedstoneInput extends BCTrigger {
public int getIconIndex() {
return active ? StatementIconProvider.Trigger_RedstoneInput_Active : StatementIconProvider.Trigger_RedstoneInput_Inactive;
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -12,14 +12,12 @@ import java.util.Locale;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.triggers.BCTrigger;
import buildcraft.core.utils.StringUtils;
@ -29,8 +27,6 @@ import buildcraft.energy.TileEngine.EnergyStage;
public class TriggerEngineHeat extends BCTrigger {
public EnergyStage stage;
@SideOnly(Side.CLIENT)
private IIcon icon;
public TriggerEngineHeat(EnergyStage stage) {
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;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon() {
return icon;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_engineheat_" + stage.name().toLowerCase(Locale.ENGLISH));
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -10,13 +10,11 @@ package buildcraft.silicon.statements;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.BlockIndex;
import buildcraft.api.gates.ActionParameterItemStack;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.IActionParameter;
import buildcraft.api.gates.IGate;
import buildcraft.api.robots.AIRobot;
@ -32,17 +30,10 @@ import buildcraft.transport.TileGenericPipe;
public class ActionRobotGoToStation extends BCAction {
private IIcon icon;
public ActionRobotGoToStation() {
super("buildcraft:robot.goto_station");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
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");
}
@Override
public IAction rotateLeft() {
return this;
}
@Override
public void actionActivate(IGate gate, IActionParameter[] parameters) {
Pipe<?> pipe = (Pipe<?>) gate.getPipe();

View file

@ -10,7 +10,6 @@ package buildcraft.silicon.statements;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
@ -27,17 +26,10 @@ import buildcraft.transport.TileGenericPipe;
public class ActionRobotWorkInArea extends BCAction {
private IIcon icon;
public ActionRobotWorkInArea() {
super("buildcraft:robot.work_in_area");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.robot.work_in_area");

View file

@ -12,10 +12,8 @@ import java.util.LinkedList;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import buildcraft.api.gates.ActionParameterItemStack;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.IActionParameter;
import buildcraft.api.gates.IGate;
import buildcraft.core.triggers.BCAction;
@ -24,17 +22,10 @@ import buildcraft.transport.Pipe;
public class ActionStationProvideItems extends BCAction {
private IIcon icon;
public ActionStationProvideItems() {
super("buildcraft:station.provide_items");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
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");
}
@Override
public IAction rotateLeft() {
return this;
}
@Override
public int maxParameters() {
return 3;

View file

@ -12,10 +12,8 @@ import java.util.LinkedList;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import buildcraft.api.gates.ActionParameterItemStack;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.IActionParameter;
import buildcraft.api.gates.IGate;
import buildcraft.core.triggers.BCAction;
@ -24,17 +22,10 @@ import buildcraft.transport.Pipe;
public class ActionStationRequestItems extends BCAction {
private IIcon icon;
public ActionStationRequestItems() {
super("buildcraft:station.request_items");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
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");
}
@Override
public IAction rotateLeft() {
return this;
}
@Override
public int maxParameters() {
return 3;

View file

@ -9,25 +9,16 @@
package buildcraft.transport.triggers;
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.utils.StringUtils;
public class ActionEnergyPulsar extends BCAction {
private IIcon icon;
public ActionEnergyPulsar() {
super("buildcraft:pulsar.constant", "buildcraft.pulser.constant");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.pulsar.constant");
@ -37,9 +28,4 @@ public class ActionEnergyPulsar extends BCAction {
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/action_pulsar");
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -11,9 +11,7 @@ package buildcraft.transport.triggers;
import java.util.Locale;
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.utils.EnumColor;
import buildcraft.core.utils.StringUtils;
@ -21,7 +19,6 @@ import buildcraft.core.utils.StringUtils;
public class ActionExtractionPreset extends BCAction {
public final EnumColor color;
private IIcon icon;
public ActionExtractionPreset(EnumColor color) {
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());
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/extraction_preset_" + color.name().toLowerCase(Locale.ENGLISH));
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -11,9 +11,7 @@ package buildcraft.transport.triggers;
import java.util.Locale;
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.utils.EnumColor;
import buildcraft.core.utils.StringUtils;
@ -21,7 +19,6 @@ import buildcraft.core.utils.StringUtils;
public class ActionPipeColor extends BCAction {
public final EnumColor color;
private IIcon icon;
public ActionPipeColor(EnumColor color) {
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());
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/color_" + color.name().toLowerCase(Locale.ENGLISH));
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
import java.util.Locale;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
@ -22,7 +21,6 @@ import buildcraft.core.triggers.BCAction;
public class ActionPipeDirection extends BCAction {
public final ForgeDirection direction;
private IIcon icon;
public ActionPipeDirection(ForgeDirection direction) {
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";
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_dir_" + direction.name().toLowerCase(Locale.ENGLISH));

View file

@ -11,16 +11,13 @@ package buildcraft.transport.triggers;
import java.util.Locale;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import buildcraft.api.gates.IAction;
import buildcraft.core.triggers.BCAction;
import buildcraft.transport.pipes.PipePowerIron.PowerMode;
public class ActionPowerLimiter extends BCAction {
public final PowerMode limit;
private IIcon icon;
public ActionPowerLimiter(PowerMode limit) {
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";
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_limiter_" + limit.name().toLowerCase(Locale.ENGLISH));
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -14,15 +14,12 @@ import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.api.gates.IAction;
import buildcraft.core.triggers.BCAction;
import buildcraft.core.utils.StringUtils;
public class ActionRedstoneFaderOutput extends BCAction {
public final int level;
@SideOnly(Side.CLIENT)
private IIcon icon;
public ActionRedstoneFaderOutput(int level) {
super(String.format("buildcraft:redstone.output.%02d", level));
@ -46,9 +43,4 @@ public class ActionRedstoneFaderOutput extends BCAction {
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -10,7 +10,6 @@ package buildcraft.transport.triggers;
import java.util.Locale;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.IActionParameter;
import buildcraft.api.gates.IGate;
import buildcraft.api.transport.PipeWire;
@ -49,11 +48,6 @@ public class ActionSignalOutput extends BCAction {
}
}
@Override
public IAction rotateLeft() {
return this;
}
@Override
public int maxParameters() {
return 3;

View file

@ -9,25 +9,16 @@
package buildcraft.transport.triggers;
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.utils.StringUtils;
public class ActionSingleEnergyPulse extends BCAction {
private IIcon icon;
public ActionSingleEnergyPulse() {
super("buildcraft:pulsar.single", "buildcraft.pulser.single");
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.pulsar.single");
@ -37,9 +28,4 @@ public class ActionSingleEnergyPulse extends BCAction {
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/action_single_pulsar");
}
@Override
public IAction rotateLeft() {
return this;
}
}

View file

@ -11,8 +11,7 @@ package buildcraft.transport.triggers;
import java.util.Locale;
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.utils.StringUtils;
@ -29,7 +28,6 @@ public class TriggerClockTimer extends BCTrigger {
}
}
public final Time time;
private IIcon icon;
public TriggerClockTimer(Time time) {
super("buildcraft:timer." + time.name().toLowerCase(Locale.ENGLISH));
@ -37,11 +35,6 @@ public class TriggerClockTimer extends BCTrigger {
this.time = time;
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
public String getDescription() {
return String.format(StringUtils.localize("gate.trigger.timer"), time.delay);
@ -51,9 +44,4 @@ public class TriggerClockTimer extends BCTrigger {
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_" + time.name().toLowerCase(Locale.ENGLISH));
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
import java.util.Locale;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -22,7 +21,6 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import buildcraft.api.gates.IGate;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.triggers.BCTrigger;
import buildcraft.core.utils.StringUtils;
@ -46,7 +44,6 @@ public class TriggerPipeContents extends BCTrigger {
public BCTrigger trigger;
};
private PipeContents kind;
private IIcon icon;
public TriggerPipeContents(PipeContents kind) {
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;
}
@Override
public IIcon getIcon() {
return icon;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraft:triggers/trigger_pipecontents_" + kind.name().toLowerCase(Locale.ENGLISH));
}
@Override
public ITrigger rotateLeft() {
return this;
}
}

View file

@ -11,7 +11,6 @@ package buildcraft.transport.triggers;
import java.util.Locale;
import buildcraft.api.gates.IGate;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.api.transport.PipeWire;
import buildcraft.core.triggers.BCTrigger;
@ -106,11 +105,6 @@ public class TriggerPipeSignal extends BCTrigger {
return -1;
}
@Override
public ITrigger rotateLeft() {
return this;
}
@Override
public ITriggerParameter createParameter(int index) {
return new TriggerParameterSignal();

View file

@ -9,13 +9,11 @@
package buildcraft.transport.triggers;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.api.gates.IGate;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.triggers.BCTrigger;
import buildcraft.core.utils.StringUtils;
@ -24,8 +22,6 @@ import buildcraft.transport.TileGenericPipe;
public class TriggerRedstoneFaderInput extends BCTrigger {
public final int level;
@SideOnly(Side.CLIENT)
private IIcon icon;
public TriggerRedstoneFaderInput(int 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;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon() {
return icon;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level));
}
@Override
public ITrigger rotateLeft() {
return this;
}
}