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
@@ -134,7 +134,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
return;
}
final ItemStack rs = Platform.cloneItemStack( this.getStack() );
final ItemStack rs = this.getStack().copy();
if( rs.isEmpty() )
{
return;
@@ -202,7 +202,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
// update crafting matrix...
ItemStack is = this.getStack();
if( !is.isEmpty() && Platform.itemComparisons().isEqualItem( request, is ) )
if( !is.isEmpty() && ItemStack.areItemsEqual( request, is ) )
{
final ItemStack[] set = new ItemStack[this.getPattern().getSlots()];
// Safeguard for empty slots in the inventory for now
@@ -309,7 +309,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
final IAEItemStack fail = inv.injectItems( AEItemStack.create( set[x] ), Actionable.MODULATE, this.mySrc );
if( fail != null )
{
drops.add( fail.getItemStack() );
drops.add( fail.createItemStack() );
}
}
}