mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-18 11:39:07 +00:00
Initial Comment
This commit is contained in:
commit
419ac849d0
276 files changed
+17939
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package modtweaker.mods.mekanism;
|
||||
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import modtweaker.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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user