Validate Recipe before Extraction.

This commit is contained in:
AlgorithmX2 2014-08-02 16:19:43 -05:00
parent b01360c6a0
commit 7ccb850037

View file

@ -583,15 +583,19 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
{
fuzz = fuzz.copy();
fuzz.setStackSize( input[x].getStackSize() );
IAEItemStack ais = inventory.extractItems( fuzz, Actionable.MODULATE, machineSrc );
ItemStack is = ais == null ? null : ais.getItemStack();
if ( is != null && details.isValidItemForSlot( x, is, getWorld() ) )
if ( details.isValidItemForSlot( x, fuzz.getItemStack(), getWorld() ) )
{
postChange( AEItemStack.create( is ), machineSrc );
ic.setInventorySlotContents( x, is );
found = true;
break;
IAEItemStack ais = inventory.extractItems( fuzz, Actionable.MODULATE, machineSrc );
ItemStack is = ais == null ? null : ais.getItemStack();
if ( is != null )
{
postChange( AEItemStack.create( is ), machineSrc );
ic.setInventorySlotContents( x, is );
found = true;
break;
}
}
}
}