null check outputs, fixes #513

This commit is contained in:
way2muchnoise
2016-10-25 20:19:43 +02:00
parent 8699bd6dd6
commit 30e2a7afeb

View File

@@ -79,11 +79,15 @@ public class CraftingStepCraft extends CraftingStep {
}
for (ItemStack byproduct : (pattern.isOredict()? pattern.getByproducts(took) : pattern.getByproducts())) {
toInsertItems.add(byproduct.copy());
if(byproduct != null) {
toInsertItems.add(byproduct.copy());
}
}
for (ItemStack output : (pattern.isOredict() ? pattern.getOutputs(took) : pattern.getOutputs())) {
toInsertItems.add(output.copy());
if(output != null) {
toInsertItems.add(output.copy());
}
}
}