Files
ModTweaker/src/main/java/modtweaker2/helpers/StackHelper.java
T

19 lines
642 B
Java
Raw Normal View History

package modtweaker2.helpers;
2015-01-11 21:59:45 +02:00
2015-03-17 23:06:34 +02:00
//import modtweaker2.mods.botania.Botania;
import modtweaker2.mods.botania.Botania;
2015-03-17 23:06:34 +02:00
import modtweaker2.utils.TweakerPlugin;
2015-01-11 21:59:45 +02:00
import net.minecraft.item.ItemStack;
public class StackHelper {
2015-03-17 23:06:34 +02:00
// Stack is the stack that is part of a recipe, stack2 is the one input
// trying to match
public static boolean areEqual(ItemStack stack, ItemStack stack2) {
if (stack == null || stack2 == null)
return false;
else if (TweakerPlugin.isLoaded("Botania") && Botania.isSubtile(stack) && Botania.isSubtile(stack2)) {
return Botania.subtileMatches(stack, stack2);
} else
return stack.isItemEqual(stack2);
}
2015-01-11 21:59:45 +02:00
}