From b36ee3bf8457115e5dd6ec94ec64e7ae03d7098d Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Fri, 18 Jul 2014 14:30:29 -0500 Subject: [PATCH] Don't mark things that don't exist. --- crafting/CraftingTreeNode.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crafting/CraftingTreeNode.java b/crafting/CraftingTreeNode.java index 6b1edddd..84d76491 100644 --- a/crafting/CraftingTreeNode.java +++ b/crafting/CraftingTreeNode.java @@ -103,8 +103,11 @@ public class CraftingTreeNode if ( !exhausted ) { IAEItemStack is = job.checkUse( available ); - thingsUsed.add( is.copy() ); - used.add( is ); + if ( is != null ) + { + thingsUsed.add( is.copy() ); + used.add( is ); + } } bytes += available.getStackSize(); @@ -125,8 +128,11 @@ public class CraftingTreeNode if ( !exhausted ) { IAEItemStack is = job.checkUse( available ); - thingsUsed.add( is.copy() ); - used.add( is ); + if ( is != null ) + { + thingsUsed.add( is.copy() ); + used.add( is ); + } } bytes += available.getStackSize();