More itemstacks caching

Micro optimization on molecular assemblers
This commit is contained in:
PrototypeTrousers
2022-02-21 03:58:02 -03:00
parent 17a900ae9a
commit 8846202270
9 changed files with 700 additions and 523 deletions
@@ -77,6 +77,10 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
@Override
public void setStackInSlot( int slot, @Nonnull ItemStack stack )
{
if( stack == this.getStackInSlot( slot ) )
{
return;
}
this.previousStack = this.getStackInSlot( slot ).copy();
super.setStackInSlot( slot, stack );
}