Fixed Icon API for Actions/Triggers

This commit is contained in:
Krapht 2013-04-11 19:28:34 +02:00
parent 08f0216be7
commit b624b5dd9f
17 changed files with 79 additions and 142 deletions

View file

@ -1,6 +1,5 @@
package buildcraft.api.gates; package buildcraft.api.gates;
import net.minecraft.util.Icon;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -9,8 +8,7 @@ public interface IAction {
int getId(); int getId();
@SideOnly(Side.CLIENT) int getIconIndex();
Icon getTexture();
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
IIconProvider getIconProvider(); IIconProvider getIconProvider();

View file

@ -1,21 +1,16 @@
package buildcraft.api.gates; package buildcraft.api.gates;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
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.ForgeDirection;
public interface ITrigger { public interface ITrigger {
public abstract int getId(); public abstract int getId();
/** public int getIconIndex();
* Return the texture file for this trigger icon
*/
@SideOnly(Side.CLIENT)
public Icon getTextureIcon();
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IIconProvider getIconProvider(); public IIconProvider getIconProvider();

View file

@ -1,8 +1,5 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.util.Icon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ActionMachineControl extends BCAction { public class ActionMachineControl extends BCAction {
@ -31,20 +28,17 @@ public class ActionMachineControl extends BCAction {
return ""; return "";
} }
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTexture() {
switch (mode) { switch (mode) {
case On: case On:
return getIconProvider().getIcon(ActionTriggerIconProvider.Action_MachineControl_On); return ActionTriggerIconProvider.Action_MachineControl_On;
case Off: case Off:
return getIconProvider().getIcon(ActionTriggerIconProvider.Action_MachineControl_Off); return ActionTriggerIconProvider.Action_MachineControl_Off;
case Loop: case Loop:
return getIconProvider().getIcon(ActionTriggerIconProvider.Action_MachineControl_Loop);
default: default:
return null; return ActionTriggerIconProvider.Action_MachineControl_Loop;
} }
} }
} }

View file

@ -9,9 +9,6 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.util.Icon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ActionRedstoneOutput extends BCAction { public class ActionRedstoneOutput extends BCAction {
@ -25,8 +22,7 @@ public class ActionRedstoneOutput extends BCAction {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTexture() { return ActionTriggerIconProvider.Trigger_RedstoneInput_Active;
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_RedstoneInput_Active);
} }
} }

View file

@ -9,7 +9,6 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.util.Icon;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
import buildcraft.api.gates.ActionManager; import buildcraft.api.gates.ActionManager;
@ -32,8 +31,7 @@ public abstract class BCAction implements IAction {
} }
@Override @Override
@SideOnly(Side.CLIENT) public abstract int getIconIndex();
public abstract Icon getTexture();
@Override @Override
public boolean hasParameter() { public boolean hasParameter() {

View file

@ -10,7 +10,7 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraftforge.common.ForgeDirection;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
import buildcraft.api.gates.ActionManager; import buildcraft.api.gates.ActionManager;
@ -19,7 +19,6 @@ import buildcraft.api.gates.ITriggerParameter;
import buildcraft.api.gates.TriggerParameter; import buildcraft.api.gates.TriggerParameter;
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.ForgeDirection;
/** /**
* This class has to be implemented to create new triggers kinds to BuildCraft gates. There is an instance per kind, which will get called wherever the trigger * This class has to be implemented to create new triggers kinds to BuildCraft gates. There is an instance per kind, which will get called wherever the trigger
@ -39,15 +38,14 @@ public abstract class BCTrigger implements ITrigger {
return this.id; return this.id;
} }
@Override
@SideOnly(Side.CLIENT)
public abstract Icon getTextureIcon();
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IIconProvider getIconProvider() { public IIconProvider getIconProvider() {
return BuildCraftCore.instance.actionTriggerIconProvider; return BuildCraftCore.instance.actionTriggerIconProvider;
} }
@Override
public abstract int getIconIndex();
@Override @Override
public boolean hasParameter() { public boolean hasParameter() {

View file

@ -12,14 +12,11 @@ package buildcraft.core.triggers;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.ISidedInventory; import net.minecraftforge.common.ISidedInventory;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.utils.SidedInventoryAdapter; import buildcraft.core.utils.SidedInventoryAdapter;
import buildcraft.core.utils.Utils; import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TriggerInventory extends BCTrigger { public class TriggerInventory extends BCTrigger {
@ -115,17 +112,16 @@ public class TriggerInventory extends BCTrigger {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
switch (state) { switch (state) {
case Empty: case Empty:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Inventory_Empty); return ActionTriggerIconProvider.Trigger_Inventory_Empty;
case Contains: case Contains:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Inventory_Contains); return ActionTriggerIconProvider.Trigger_Inventory_Contains;
case Space: case Space:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Inventory_Space); return ActionTriggerIconProvider.Trigger_Inventory_Space;
default: default:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Inventory_Full); return ActionTriggerIconProvider.Trigger_Inventory_Full;
} }
} }
} }

View file

@ -10,15 +10,12 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.liquids.ILiquidTank; import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.ITankContainer; import net.minecraftforge.liquids.ITankContainer;
import net.minecraftforge.liquids.LiquidContainerRegistry; import net.minecraftforge.liquids.LiquidContainerRegistry;
import net.minecraftforge.liquids.LiquidStack; import net.minecraftforge.liquids.LiquidStack;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TriggerLiquidContainer extends BCTrigger { public class TriggerLiquidContainer extends BCTrigger {
@ -124,17 +121,16 @@ public class TriggerLiquidContainer extends BCTrigger {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
switch (state) { switch (state) {
case Empty: case Empty:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_LiquidContainer_Empty); return ActionTriggerIconProvider.Trigger_LiquidContainer_Empty;
case Contains: case Contains:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_LiquidContainer_Contains); return ActionTriggerIconProvider.Trigger_LiquidContainer_Contains;
case Space: case Space:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_LiquidContainer_Space); return ActionTriggerIconProvider.Trigger_LiquidContainer_Space;
default: default:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_LiquidContainer_Full); return ActionTriggerIconProvider.Trigger_LiquidContainer_Full;
} }
} }
} }

View file

@ -10,12 +10,9 @@
package buildcraft.core.triggers; package buildcraft.core.triggers;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.ForgeDirection;
public class TriggerMachine extends BCTrigger { public class TriggerMachine extends BCTrigger {
@ -50,11 +47,10 @@ public class TriggerMachine extends BCTrigger {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
if (active) if (active)
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Machine_Active); return ActionTriggerIconProvider.Trigger_Machine_Active;
else else
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Machine_Inactive); return ActionTriggerIconProvider.Trigger_Machine_Inactive;
} }
} }

View file

@ -10,13 +10,10 @@
package buildcraft.energy; package buildcraft.energy;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCTrigger; import buildcraft.core.triggers.BCTrigger;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.ForgeDirection;
public class TriggerEngineHeat extends BCTrigger { public class TriggerEngineHeat extends BCTrigger {
@ -54,17 +51,16 @@ public class TriggerEngineHeat extends BCTrigger {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
switch (stage) { switch (stage) {
case Blue: case Blue:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_EngineHeat_Blue); return ActionTriggerIconProvider.Trigger_EngineHeat_Blue;
case Green: case Green:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_EngineHeat_Green); return ActionTriggerIconProvider.Trigger_EngineHeat_Green;
case Yellow: case Yellow:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_EngineHeat_Yellow); return ActionTriggerIconProvider.Trigger_EngineHeat_Yellow;
default: default:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_EngineHeat_Red); return ActionTriggerIconProvider.Trigger_EngineHeat_Red;
} }
} }
} }

View file

@ -61,7 +61,7 @@ public class GuiGateInterface extends GuiAdvancedInterface {
public Icon getTexture() { public Icon getTexture() {
ITrigger trigger = pipe.getTrigger(slot); ITrigger trigger = pipe.getTrigger(slot);
if (trigger != null) if (trigger != null)
return trigger.getTextureIcon(); return trigger.getIconProvider().getIcon(trigger.getIconIndex());
else else
return null; return null;
} }
@ -102,7 +102,7 @@ public class GuiGateInterface extends GuiAdvancedInterface {
public Icon getTexture() { public Icon getTexture() {
IAction action = pipe.getAction(slot); IAction action = pipe.getAction(slot);
if (action != null) if (action != null)
return action.getTexture(); return action.getIconProvider().getIcon(action.getIconIndex());
else else
return null; return null;
} }

View file

@ -1,10 +1,7 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCAction; import buildcraft.core.triggers.BCAction;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ActionEnergyPulser extends BCAction { public class ActionEnergyPulser extends BCAction {
@ -13,11 +10,10 @@ public class ActionEnergyPulser extends BCAction {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTexture() { return ActionTriggerIconProvider.Trigger_Machine_Active;
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Machine_Active);
} }
@Override @Override
public String getDescription() { public String getDescription() {
return "Energy Pulser"; return "Energy Pulser";

View file

@ -9,12 +9,9 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCAction; import buildcraft.core.triggers.BCAction;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ActionSignalOutput extends BCAction { public class ActionSignalOutput extends BCAction {
@ -43,19 +40,17 @@ public class ActionSignalOutput extends BCAction {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTexture() {
switch (color) { switch (color) {
case Red: case Red:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Red_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Red_Active;
case Blue: case Blue:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Active;
case Green: case Green:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Green_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Green_Active;
case Yellow: case Yellow:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Active); default:
return ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Active;
} }
return null;
} }
} }

View file

@ -1,10 +1,7 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCAction; import buildcraft.core.triggers.BCAction;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ActionSingleEnergyPulse extends BCAction { public class ActionSingleEnergyPulse extends BCAction {
@ -12,15 +9,13 @@ public class ActionSingleEnergyPulse extends BCAction {
super(id); super(id);
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTexture() { return ActionTriggerIconProvider.Trigger_Machine_Active;
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_Machine_Active); }
}
@Override @Override
public String getDescription() { public String getDescription() {
return "Single Energy Pulse"; return "Single Energy Pulse";
} }
} }

View file

@ -9,7 +9,6 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.liquids.ILiquidTank; import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.LiquidContainerRegistry; import net.minecraftforge.liquids.LiquidContainerRegistry;
@ -23,8 +22,6 @@ import buildcraft.transport.Pipe;
import buildcraft.transport.PipeTransportItems; import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.PipeTransportLiquids; import buildcraft.transport.PipeTransportLiquids;
import buildcraft.transport.PipeTransportPower; import buildcraft.transport.PipeTransportPower;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TriggerPipeContents extends BCTrigger implements ITriggerPipe { public class TriggerPipeContents extends BCTrigger implements ITriggerPipe {
@ -127,18 +124,18 @@ public class TriggerPipeContents extends BCTrigger implements ITriggerPipe {
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
switch (kind) { switch (kind) {
case Empty: case Empty:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeContents_Empty); return ActionTriggerIconProvider.Trigger_PipeContents_Empty;
case ContainsItems: case ContainsItems:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeContents_ContainsItems); return ActionTriggerIconProvider.Trigger_PipeContents_ContainsItems;
case ContainsLiquids: case ContainsLiquids:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeContents_ContainsLiquid); return ActionTriggerIconProvider.Trigger_PipeContents_ContainsLiquid;
case ContainsEnergy: case ContainsEnergy:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeContents_ContainsEnergy); default:
return ActionTriggerIconProvider.Trigger_PipeContents_ContainsEnergy;
} }
return null;
} }
} }

View file

@ -9,15 +9,12 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCTrigger; import buildcraft.core.triggers.BCTrigger;
import buildcraft.transport.ITriggerPipe; import buildcraft.transport.ITriggerPipe;
import buildcraft.transport.Pipe; import buildcraft.transport.Pipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TriggerPipeSignal extends BCTrigger implements ITriggerPipe { public class TriggerPipeSignal extends BCTrigger implements ITriggerPipe {
@ -72,34 +69,32 @@ public class TriggerPipeSignal extends BCTrigger implements ITriggerPipe {
else else
return pipe.signalStrength[color.ordinal()] == 0; return pipe.signalStrength[color.ordinal()] == 0;
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
if (active) { if (active) {
switch (color) { switch (color) {
case Red: case Red:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Red_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Red_Active;
case Blue: case Blue:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Active;
case Green: case Green:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Green_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Green_Active;
case Yellow: case Yellow:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Active); return ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Active;
} }
} else { } else {
switch (color) { switch (color) {
case Red: case Red:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Red_Inactive); return ActionTriggerIconProvider.Trigger_PipeSignal_Red_Inactive;
case Blue: case Blue:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Inactive); return ActionTriggerIconProvider.Trigger_PipeSignal_Blue_Inactive;
case Green: case Green:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Green_Inactive); return ActionTriggerIconProvider.Trigger_PipeSignal_Green_Inactive;
case Yellow: case Yellow:
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Inactive); return ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Inactive;
} }
} }
return -1;
return null;
} }
} }

View file

@ -9,14 +9,11 @@
package buildcraft.transport.triggers; package buildcraft.transport.triggers;
import net.minecraft.util.Icon;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.ActionTriggerIconProvider;
import buildcraft.core.triggers.BCTrigger; import buildcraft.core.triggers.BCTrigger;
import buildcraft.transport.ITriggerPipe; import buildcraft.transport.ITriggerPipe;
import buildcraft.transport.Pipe; import buildcraft.transport.Pipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TriggerRedstoneInput extends BCTrigger implements ITriggerPipe { public class TriggerRedstoneInput extends BCTrigger implements ITriggerPipe {
@ -43,13 +40,12 @@ public class TriggerRedstoneInput extends BCTrigger implements ITriggerPipe {
else else
return !pipe.worldObj.isBlockIndirectlyGettingPowered(pipe.xCoord, pipe.yCoord, pipe.zCoord); return !pipe.worldObj.isBlockIndirectlyGettingPowered(pipe.xCoord, pipe.yCoord, pipe.zCoord);
} }
@Override @Override
@SideOnly(Side.CLIENT) public int getIconIndex() {
public Icon getTextureIcon() {
if (active) if (active)
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_RedstoneInput_Active); return ActionTriggerIconProvider.Trigger_RedstoneInput_Active;
else else
return getIconProvider().getIcon(ActionTriggerIconProvider.Trigger_RedstoneInput_Inactive); return ActionTriggerIconProvider.Trigger_RedstoneInput_Inactive;
} }
} }