ModTweaker2 Rework

- Revised base classes for IUndoableAction
- Reordered lots of code, so stuck actions should be less frequent
- Added wildcard support to many "remove" methods
- Started working on exist & duplicate checks
This commit is contained in:
Zixxl committed 2015-06-29 16:36:35 +02:00
1 parent f5034b04d8
commit da33cc6fab
112 files changed
+4596 -3522

No files matched your search

@@ -1,27 +1,27 @@
package modtweaker2.mods.mekanism;
import mekanism.api.gas.GasRegistry;
import mekanism.api.gas.GasStack;
import minetweaker.api.item.IIngredient;
import modtweaker2.mods.mekanism.gas.IGasStack;
public class MekanismHelper {
private MekanismHelper() {}
public static GasStack toGas(IGasStack iStack) {
if (iStack == null) {
return null;
} else return new GasStack(GasRegistry.getGas(iStack.getName()), iStack.getAmount());
}
public static GasStack[] toGases(IIngredient[] input) {
return toGases((IGasStack[]) input);
}
public static GasStack[] toGases(IGasStack[] iStack) {
GasStack[] stack = new GasStack[iStack.length];
for (int i = 0; i < stack.length; i++)
stack[i] = toGas(iStack[i]);
return stack;
}
}
//package modtweaker2.mods.mekanism;
//
//import mekanism.api.gas.GasRegistry;
//import mekanism.api.gas.GasStack;
//import minetweaker.api.item.IIngredient;
//import modtweaker2.mods.mekanism.gas.IGasStack;
//
//public class MekanismHelper {
// private MekanismHelper() {}
//
// public static GasStack toGas(IGasStack iStack) {
// if (iStack == null) {
// return null;
// } else return new GasStack(GasRegistry.getGas(iStack.getName()), iStack.getAmount());
// }
//
// public static GasStack[] toGases(IIngredient[] input) {
// return toGases((IGasStack[]) input);
// }
//
// public static GasStack[] toGases(IGasStack[] iStack) {
// GasStack[] stack = new GasStack[iStack.length];
// for (int i = 0; i < stack.length; i++)
// stack[i] = toGas(iStack[i]);
// return stack;
// }
//}