2015-02-20 23:57:32 +02:00
|
|
|
package modtweaker2.helpers;
|
2015-01-11 21:59:45 +02:00
|
|
|
|
2015-03-17 23:06:34 +02:00
|
|
|
//import modtweaker2.mods.botania.Botania;
|
2015-02-20 23:57:32 +02:00
|
|
|
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
|
|
|
}
|