Fixed a bug with Crafting Calculator choosing the slower calculation for all types of patterns.

This commit is contained in:
AlgorithmX2 2014-09-15 13:14:53 -05:00
parent 5c5f43a5a9
commit 1dc501a263

View file

@ -64,26 +64,22 @@ public class CraftingTreeProcess
fullsimulation = true; fullsimulation = true;
} }
for (int x = 0; x < list.length; x++) for ( IAEItemStack part : details.getCondencedInputs() )
{ {
IAEItemStack part = list[x]; ItemStack g = part.getItemStack();
if ( part != null )
boolean isAnInput = false;
for ( IAEItemStack a : details.getCondencedOutputs() )
{ {
ItemStack g = part.getItemStack(); if ( g != null && a != null && a.equals( g ) )
isAnInput = true;
boolean isAnInput = false;
for (IAEItemStack a : is)
{
if ( g != null && a != null && a.equals( g ) )
isAnInput = true;
}
if ( isAnInput )
limitQty = true;
if ( g.getItem().hasContainerItem( g ) )
limitQty = containerItems = true;
} }
if ( isAnInput )
limitQty = true;
if ( g.getItem().hasContainerItem( g ) )
limitQty = containerItems = true;
} }
boolean complicated = false; boolean complicated = false;
@ -117,26 +113,19 @@ public class CraftingTreeProcess
} }
else else
{ {
IAEItemStack list[] = details.getInputs(); for ( IAEItemStack part : details.getCondencedInputs() )
IAEItemStack[] is = details.getInputs();
for (int x = 0; x < list.length; x++)
{ {
IAEItemStack part = list[x]; ItemStack g = part.getItemStack();
if ( part != null )
boolean isAnInput = false;
for (IAEItemStack a : details.getCondencedOutputs())
{ {
ItemStack g = part.getItemStack(); if ( g != null && a != null && a.equals( g ) )
isAnInput = true;
boolean isAnInput = false;
for (IAEItemStack a : is)
{
if ( g != null && a != null && a.equals( g ) )
isAnInput = true;
}
if ( isAnInput )
limitQty = true;
} }
if ( isAnInput )
limitQty = true;
} }
for (IAEItemStack part : details.getCondencedInputs()) for (IAEItemStack part : details.getCondencedInputs())