From 03ff5b64974ca38d2158f81267fba2cadef87d0f Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sun, 13 Jul 2014 21:21:23 -0500 Subject: [PATCH] for undamaged recipes, use simpler calculations. --- crafting/CraftingTreeProcess.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/crafting/CraftingTreeProcess.java b/crafting/CraftingTreeProcess.java index 4e1ee816..27b8683b 100644 --- a/crafting/CraftingTreeProcess.java +++ b/crafting/CraftingTreeProcess.java @@ -72,8 +72,25 @@ public class CraftingTreeProcess if ( g.getItem().hasContainerItem( g ) ) damageable = true; + } + } - nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() ); + boolean complicated = false; + + if ( damageable || complicated ) + { + for (int x = 0; x < list.length; x++) + { + IAEItemStack part = list[x]; + if ( part != null ) + nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() ); + } + } + else + { + for (IAEItemStack part : details.getCondencedInputs()) + { + nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, -1, depth + 1 ), part.getStackSize() ); } } }