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
@@ -160,11 +160,11 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
@Override
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if ( hand == EnumHand.OFF_HAND )
if( hand == EnumHand.OFF_HAND )
{
return false;
}
final ItemStack is = player.getHeldItem( hand );
// UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor( is.getItem() );
@@ -265,7 +265,7 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
break;
}
if( !newType.isEmpty() && !Platform.itemComparisons().isEqualItem( newType, this.getItemStack() ) )
if( !newType.isEmpty() && !ItemStack.areItemsEqual( newType, this.getItemStack() ) )
{
final boolean oldOutput = this.isOutput();
final short myFreq = this.getFrequency();