null check the stack before stripping

This commit is contained in:
way2muchnoise
2016-12-14 19:05:37 +01:00
parent 998deef60c
commit beb2ccf3ba

View File

@@ -290,7 +290,7 @@ public class CraftingPattern implements ICraftingPattern {
} }
private static ItemStack stripTags(ItemStack stack) { private static ItemStack stripTags(ItemStack stack) {
if (stack.hasTagCompound()) { if (stack != null && !stack.isEmpty() && stack.hasTagCompound()) {
switch (stack.getItem().getRegistryName().getResourceDomain()) { switch (stack.getItem().getRegistryName().getResourceDomain()) {
case "mekanism": case "mekanism":
stack.getTagCompound().removeTag("mekData"); stack.getTagCompound().removeTag("mekData");