Rework AEItemStack (#3091)
* Use itemstack as itemdef * HIGH_TAG/LOW_TAG should be compared both directions * Remove getTagCompound * Make Itemlist implementation independent * Cache item id for performance reasons * Add preconditions to saveguard against external meddling * Chache itemDamage * Remove IAEStackSearchKey for now, rename getDisplayStack
This commit is contained in:
@@ -140,7 +140,7 @@ public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return this.inv[var1].getItemStack();
|
||||
return this.inv[var1].createItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -227,7 +227,7 @@ public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable
|
||||
ItemStack newStack = newItemStack.copy();
|
||||
InvOperation op = InvOperation.SET;
|
||||
|
||||
if( Platform.itemComparisons().isEqualItem( oldStack, newStack ) )
|
||||
if( ItemStack.areItemsEqual( oldStack, newStack ) )
|
||||
{
|
||||
if( newStack.getCount() > oldStack.getCount() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user