remove forced level emitters update

remove unneeded itemStack creation.
This commit is contained in:
Salomão
2021-01-04 12:34:44 -03:00
parent a3e69ce608
commit e6998913e1
3 changed files with 4 additions and 8 deletions
@@ -504,17 +504,16 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
fuzz = fuzz.copy();
fuzz.setStackSize( g.getStackSize() );
final IAEItemStack ais = this.inventory.extractItems( fuzz, Actionable.SIMULATE, this.machineSrc );
final ItemStack is = ais == null ? ItemStack.EMPTY : ais.createItemStack();
if( !is.isEmpty() && is.getCount() == g.getStackSize() )
if (ais != null && ais.getStackSize() == g.getStackSize())
{
found = true;
break;
}
else if( !is.isEmpty() )
else if( ais != null )
{
g = g.copy();
g.decStackSize( is.getCount() );
g.decStackSize( ais.getStackSize() );
}
}
@@ -526,9 +525,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
else
{
final IAEItemStack ais = this.inventory.extractItems( g.copy(), Actionable.SIMULATE, this.machineSrc );
final ItemStack is = ais == null ? ItemStack.EMPTY : ais.createItemStack();
if( is.isEmpty() || is.getCount() < g.getStackSize() )
if (ais == null || ais.getStackSize() < g.getStackSize())
{
return false;
}