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:
@@ -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() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user