this.depth = depth;
world = job.getWorld();
if ( details.isCraftable() )
{
IAEItemStack list[] = details.getInputs();
InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
IAEItemStack[] is = details.getInputs();
for (int x = 0; x < ic.getSizeInventory(); x++)
ic.setInventorySlotContents( x, is[x] == null ? null : is[x].getItemStack() );
FMLCommonHandler.instance().firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) world ), details.getOutput( ic, world ), ic );
for (int x = 0; x < ic.getSizeInventory(); x++)
{
ItemStack g = ic.getStackInSlot( x );
if ( g != null && g.stackSize > 1 )
fullSimulation = true;
}
for ( IAEItemStack part : details.getCondensedInputs() )
{
ItemStack g = part.getItemStack();
boolean isAnInput = false;
for ( IAEItemStack a : details.getCondensedOutputs() )
{
if ( g != null && a != null && a.equals( g ) )
isAnInput = true;
}
if ( isAnInput )
limitQty = true;
if ( g.getItem().hasContainerItem( g ) )
limitQty = containerItems = true;
}
boolean complicated = false;
if ( containerItems || complicated )
{
for (int x = 0; x < list.length; x++)
{
IAEItemStack part = list[x];
if ( part != null )
nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() );
}
}
else
{
// this is minorly different then below, this slot uses the pattern, but kinda fudges it.
for (IAEItemStack part : details.getCondensedInputs())
{
for (int x = 0; x < list.length; x++)
{
IAEItemStack comparePart = list[x];
if ( part != null && part.equals( comparePart ) )
{
// use the first slot...
nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() );
break;