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:
@@ -141,10 +141,7 @@ public class PacketInventoryAction extends AppEngPacket
|
||||
|
||||
if( baseContainer.getTargetStack() != null )
|
||||
{
|
||||
// Force to stack size 1 to fix a client-side display problem...
|
||||
ItemStack displayIs = baseContainer.getTargetStack().getItemStack();
|
||||
displayIs.setCount( 1 );
|
||||
cca.getCraftingItem().putStack( displayIs );
|
||||
cca.getCraftingItem().putStack( baseContainer.getTargetStack().asItemStackRepresentation() );
|
||||
// This is the *actual* item that matters, not the display item above
|
||||
cca.setItemToCraft( baseContainer.getTargetStack() );
|
||||
}
|
||||
@@ -171,7 +168,7 @@ public class PacketInventoryAction extends AppEngPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( this.slotItem.getItemStack() );
|
||||
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( this.slotItem.createItemStack() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
final IAEItemStack out = cct.useRealItems() ? Platform.poweredInsert( energy, storage, in, cct.getActionSource() ) : null;
|
||||
if( out != null )
|
||||
{
|
||||
currentItem = out.getItemStack();
|
||||
currentItem = out.createItemStack();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -188,7 +188,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
|
||||
if( out != null )
|
||||
{
|
||||
currentItem = out.getItemStack();
|
||||
currentItem = out.createItemStack();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user