diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-05-24 20:13:22 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-05-24 20:13:22 +0300 |
| commit | 8ed8c659da9496bf49fec94c049b0abae21746a8 (patch) | |
| tree | e8fd775699a2255c17a804b26b4a0a6f43d857a0 /ihl/recipes/IronWorkbenchRecipe.java | |
| parent | b67ac617dc9c5f43b911158a281c3c61ced5ea5a (diff) | |
fixing bugs with Iron workbench and fractionator
Diffstat (limited to 'ihl/recipes/IronWorkbenchRecipe.java')
| -rw-r--r-- | ihl/recipes/IronWorkbenchRecipe.java | 12 |
1 files changed, 10 insertions, 2 deletions
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<ItemStack> workspaceElements=new ArrayList<ItemStack>();
@@ -70,7 +71,14 @@ public class IronWorkbenchRecipe { }
}
- this.outputs.addAll(output1_1);
+ Iterator<ItemStack> 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!");
|
