Recursive crafting works.

MA's can accept pushes.
Interfaces no alter pushing behavior depending on ICraftingMachine settings.
Fixed bug where crafting would record items that don't exist as available for the initial pull.
This commit is contained in:
AlgorithmX2
2014-06-20 02:12:39 -05:00
parent fea125a993
commit 6cbc5aa953
6 changed files with 64 additions and 28 deletions
+4 -2
View File
@@ -32,6 +32,7 @@ public class CraftingTreeNode
boolean cannotUse = false;
long missing = 0;
CraftingJob job;
IItemList<IAEItemStack> used = AEApi.instance().storage().createItemList();
boolean exhausted = false;
@@ -42,6 +43,7 @@ public class CraftingTreeNode
parent = par;
this.slot = slot;
this.world = job.jobHost.getWorld();
this.job = job;
sim = false;
for (ICraftingPatternDetails details : cc.getCraftingFor( what ))// in order.
@@ -90,7 +92,7 @@ public class CraftingTreeNode
if ( available != null )
{
if ( !exhausted )
used.add( available );
used.add( job.checkUse( available ) );
l -= available.getStackSize();
if ( l == 0 )
@@ -106,7 +108,7 @@ public class CraftingTreeNode
if ( available != null )
{
if ( !exhausted )
used.add( available );
used.add( job.checkUse( available ) );
l -= available.getStackSize();
if ( l == 0 )