fix container items return properly
This commit is contained in:
@@ -199,11 +199,6 @@ public class CraftingTreeNode
|
|||||||
|
|
||||||
final IAEItemStack available = inv.extractItems( madeWhat, Actionable.MODULATE, src );
|
final IAEItemStack available = inv.extractItems( madeWhat, Actionable.MODULATE, src );
|
||||||
|
|
||||||
for( IAEItemStack i : pro.getReturnedContainers() )
|
|
||||||
{
|
|
||||||
inv.injectItems( i, Actionable.MODULATE, src );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( available != null )
|
if( available != null )
|
||||||
{
|
{
|
||||||
this.bytes += available.getStackSize();
|
this.bytes += available.getStackSize();
|
||||||
@@ -234,11 +229,6 @@ public class CraftingTreeNode
|
|||||||
this.what.setStackSize( l );
|
this.what.setStackSize( l );
|
||||||
final IAEItemStack available = subInv.extractItems( this.what, Actionable.MODULATE, src );
|
final IAEItemStack available = subInv.extractItems( this.what, Actionable.MODULATE, src );
|
||||||
|
|
||||||
for( IAEItemStack i : pro.getReturnedContainers() )
|
|
||||||
{
|
|
||||||
inv.injectItems( i, Actionable.MODULATE, src );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( available != null )
|
if( available != null )
|
||||||
{
|
{
|
||||||
if( !subInv.commit( src ) )
|
if( !subInv.commit( src ) )
|
||||||
|
|||||||
@@ -311,6 +311,12 @@ public class CraftingTreeProcess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( containerItems != null) {
|
||||||
|
for (IAEItemStack i : containerItemsList) {
|
||||||
|
inv.injectItems(i, Actionable.MODULATE, src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// assume its possible.
|
// assume its possible.
|
||||||
|
|
||||||
// add crafting results..
|
// add crafting results..
|
||||||
@@ -323,15 +329,6 @@ public class CraftingTreeProcess
|
|||||||
this.crafts += amountOfTimes;
|
this.crafts += amountOfTimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IAEItemStack> getReturnedContainers()
|
|
||||||
{
|
|
||||||
if( containerItemsList == null )
|
|
||||||
{
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
return containerItemsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
void dive( final CraftingJob job )
|
void dive( final CraftingJob job )
|
||||||
{
|
{
|
||||||
job.addTask( this.getAmountCrafted( this.parent.getStack( 1 ) ), this.crafts, this.details, this.depth );
|
job.addTask( this.getAmountCrafted( this.parent.getStack( 1 ) ), this.crafts, this.details, this.depth );
|
||||||
|
|||||||
Reference in New Issue
Block a user