Simplify trigger registration

This commit is contained in:
CovertJaguar 2013-07-20 18:45:58 -07:00
parent 66bc9914ae
commit 4d8799019e
3 changed files with 6 additions and 6 deletions

View file

@ -20,12 +20,12 @@ public class ActionManager {
}
}
public static void registerTrigger(String uniqueTag, ITrigger trigger){
triggers.put(uniqueTag, trigger);
public static void registerTrigger(ITrigger trigger){
triggers.put(trigger.getUniqueTag(), trigger);
}
public static void registerAction(String uniqueTag, IAction action){
actions.put(uniqueTag, action);
public static void registerAction(IAction action){
actions.put(action.getUniqueTag(), action);
}
public static LinkedList<ITrigger> getNeighborTriggers(Block block, TileEntity entity) {

View file

@ -22,7 +22,7 @@ public abstract class BCAction implements IAction {
public BCAction(int legacyId, String uniqueTag) {
this.legacyId = legacyId;
this.uniqueTag = uniqueTag;
ActionManager.registerAction(uniqueTag, this);
ActionManager.registerAction(this);
}
@Override

View file

@ -31,7 +31,7 @@ public abstract class BCTrigger implements ITrigger {
public BCTrigger(int legacyId, String uniqueTag) {
this.legacyId = legacyId;
this.uniqueTag = uniqueTag;
ActionManager.registerTrigger(uniqueTag, this);
ActionManager.registerTrigger(this);
}
@Override