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
+8 -1
View File
@@ -31,6 +31,7 @@ public class CraftingJob implements Runnable
boolean simulate = false;
final MECraftingInventory original;
final MECraftingInventory availableCheck;
public CraftingTreeNode tree;
private BaseActionSource actionSrc;
@@ -45,6 +46,12 @@ public class CraftingJob implements Runnable
storage = AEApi.instance().storage().createItemList();
prophecies = new HashSet();
original = null;
availableCheck = null;
}
public IAEItemStack checkUse(IAEItemStack available)
{
return availableCheck.extractItems( available, Actionable.MODULATE, this.actionSrc );
}
public CraftingJob(ICraftingHost host, IAEItemStack what, Actionable mode) {
@@ -57,7 +64,7 @@ public class CraftingJob implements Runnable
CraftingCache cc = host.getGrid().getCache( CraftingCache.class );
IStorageGrid sg = host.getGrid().getCache( IStorageGrid.class );
original = new MECraftingInventory( sg.getItemInventory(), false, false, false );
availableCheck = new MECraftingInventory( sg.getItemInventory(), false, false, false );
tree = getCraftingTree( cc, what );
}