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
@@ -352,12 +352,11 @@ public class GuiCraftConfirm extends AEBaseGui
final int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
final int posY = y * offY + yo;
final ItemStack is = refStack.getItemStack();
is.setCount( 1 );
final ItemStack is = refStack.asItemStackRepresentation();
if( this.tooltip == z - viewStart )
{
dspToolTip = Platform.getItemDisplayName( is );
dspToolTip = Platform.getItemDisplayName( refStack );
if( lineList.size() > 0 )
{
@@ -309,12 +309,11 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
final int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
final int posY = y * offY + ITEMSTACK_TOP_OFFSET;
final ItemStack is = refStack.getItemStack();
is.setCount( 1 );
final ItemStack is = refStack.asItemStackRepresentation();
if( this.tooltip == z - viewStart )
{
dspToolTip = Platform.getItemDisplayName( is );
dspToolTip = Platform.getItemDisplayName( refStack );
if( lineList.size() > 0 )
{
@@ -180,7 +180,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if( this.tooltip == z - viewStart )
{
toolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
toolTip = Platform.getItemDisplayName( refStack );
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
if( refStack.getCountRequestable() > 0 )
@@ -192,7 +192,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
toolPosY = y * 18 + yo;
}
this.drawItem( posX, posY, this.repo.getItem( z ) );
this.drawItem( posX, posY, refStack.asItemStackRepresentation() );
x++;