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:
fscan
2017-09-30 17:18:30 +02:00
committed by yueh
parent 2ed7a5598a
commit 1e15b23506
75 changed files with 559 additions and 1512 deletions
@@ -125,7 +125,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
for( final IAEItemStack ais : this.inventory.getStoredItems() )
{
drops.add( ais.getItemStack() );
drops.add( ais.createItemStack() );
}
}
@@ -171,7 +171,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
for( final IAEItemStack ais : this.inventory.getStoredItems() )
{
final NBTTagCompound it = new NBTTagCompound();
ais.getItemStack().writeToNBT( it );
ais.createItemStack().writeToNBT( it );
storedItems.setTag( String.valueOf( offset ), it );
offset++;
}
@@ -322,7 +322,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
// read permissions
for( final IAEItemStack ais : this.inventory.getStoredItems() )
{
final ItemStack is = ais.getItemStack();
final ItemStack is = ais.createItemStack();
final Item i = is.getItem();
if( i instanceof IBiometricCard )
{