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:
@@ -86,7 +86,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
try
|
||||
{
|
||||
final IAEItemStack item = AEItemStack.loadItemStackFromPacket( data );
|
||||
final ItemStack is = item.getItemStack();
|
||||
final ItemStack is = item.createItemStack();
|
||||
this.inv.setStackInSlot( 0, is );
|
||||
}
|
||||
catch( final Throwable t )
|
||||
|
||||
@@ -165,7 +165,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
{
|
||||
if( ( slot & ( 1 << num ) ) > 0 )
|
||||
{
|
||||
this.inv.setStackInSlot( num, AEItemStack.loadItemStackFromPacket( data ).getItemStack() );
|
||||
this.inv.setStackInSlot( num, AEItemStack.loadItemStackFromPacket( data ).createItemStack() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user