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
+22 -20
View File
@@ -706,29 +706,31 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
if ( te instanceof ICraftingMachine )
{
if ( ((ICraftingMachine) te).pushPattern( patternDetails, table, s.getOpposite() ) )
return true;
}
else
{
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
if ( ad != null )
ICraftingMachine cm = (ICraftingMachine) te;
if ( cm.acceptsPlans() )
{
possibleDirections.remove( s );
for (int x = 0; x < table.getSizeInventory(); x++)
{
ItemStack is = table.getStackInSlot( x );
if ( is != null )
{
addToSendList( ad.addItems( is ) );
}
}
pushItemsOut( possibleDirections );
return true;
if ( cm.pushPattern( patternDetails, table, s.getOpposite() ) )
return true;
continue;
}
}
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
if ( ad != null )
{
for (int x = 0; x < table.getSizeInventory(); x++)
{
ItemStack is = table.getStackInSlot( x );
if ( is != null )
{
addToSendList( ad.addItems( is ) );
}
}
pushItemsOut( possibleDirections );
return true;
}
}
return false;