Fix Crafting Dupe on Extraction, if extraction fails roll back and fail.

This commit is contained in:
AlgorithmX2
2014-09-18 20:30:26 -05:00
parent 2913d71acd
commit 73cda63a78
3 changed files with 79 additions and 26 deletions
+4 -2
View File
@@ -44,7 +44,8 @@ public class CraftingTreeNode
boolean sim;
public CraftingTreeNode(ICraftingGrid cc, CraftingJob job, IAEItemStack wat, CraftingTreeProcess par, int slot, int depth) {
public CraftingTreeNode(ICraftingGrid cc, CraftingJob job, IAEItemStack wat, CraftingTreeProcess par, int slot, int depth)
{
what = wat;
parent = par;
this.slot = slot;
@@ -206,7 +207,8 @@ public class CraftingTreeNode
if ( available != null )
{
subInv.commit( src );
if ( !subInv.commit( src ) )
throw new CraftBranchFailure( what, l );
bytes += available.getStackSize();
l -= available.getStackSize();