From 8ed8c659da9496bf49fec94c049b0abae21746a8 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Wed, 24 May 2017 20:13:22 +0300 Subject: fixing bugs with Iron workbench and fractionator --- ihl/recipes/IronWorkbenchRecipe.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ihl/recipes/IronWorkbenchRecipe.java') diff --git a/ihl/recipes/IronWorkbenchRecipe.java b/ihl/recipes/IronWorkbenchRecipe.java index f0bd81f..e471811 100644 --- a/ihl/recipes/IronWorkbenchRecipe.java +++ b/ihl/recipes/IronWorkbenchRecipe.java @@ -3,12 +3,13 @@ package ihl.recipes; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.item.ItemStack; + import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ihl.interfaces.IWire; import ihl.utils.IHLUtils; +import net.minecraft.item.ItemStack; public class IronWorkbenchRecipe { public List workspaceElements=new ArrayList(); @@ -70,7 +71,14 @@ public class IronWorkbenchRecipe { } } - this.outputs.addAll(output1_1); + Iterator iOutput = output1_1.iterator(); + while(iOutput.hasNext()) + { + ItemStack outputStack = iOutput.next(); + if(outputStack==null) + throw new NullPointerException("Output shall not contain null."); + this.outputs.add(outputStack); + } if(tools.size()>8 || materials.size()>12) { throw new IllegalArgumentException("Iron workbench recipe cannot contain more than 8 tools or more than 12 materials!"); -- cgit v1.2.3