diff --git a/crafting/CraftingTreeNode.java b/crafting/CraftingTreeNode.java index e745088d3..daee15e61 100644 --- a/crafting/CraftingTreeNode.java +++ b/crafting/CraftingTreeNode.java @@ -49,7 +49,7 @@ public class CraftingTreeNode for (ICraftingPatternDetails details : cc.getCraftingFor( what ))// in order. { - if ( notRecurive( details ) ) + if ( parent == null || parent.notRecurive( details ) ) nodes.add( new CraftingTreeProcess( cc, job, details, this, depth + 1, world ) ); } } @@ -63,13 +63,18 @@ public class CraftingTreeNode boolean notRecurive(ICraftingPatternDetails details) { - IAEItemStack[] o = details.getOutputs(); + IAEItemStack[] o = details.getCondencedOutputs(); for (IAEItemStack i : o) if ( i.equals( what ) ) - return true; + return false; + + o = details.getCondencedInputs(); + for (IAEItemStack i : o) + if ( i.equals( what ) ) + return false; if ( parent == null ) - return false; + return true; return parent.notRecurive( details ); } diff --git a/crafting/CraftingTreeProcess.java b/crafting/CraftingTreeProcess.java index 9bebe1c8a..4e1ee8161 100644 --- a/crafting/CraftingTreeProcess.java +++ b/crafting/CraftingTreeProcess.java @@ -88,7 +88,7 @@ public class CraftingTreeProcess public boolean notRecurive(ICraftingPatternDetails details) { - return parent.notRecurive( details ); + return parent == null || parent.notRecurive( details ); } long getTimes(long remaining, long stackSize)