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
@@ -48,10 +48,11 @@ public class StorageMonitorInfoProvider implements IPartProbInfoProvider
final IAEStack<?> displayed = monitor.getDisplayed();
final boolean isLocked = monitor.isLocked();
// TODO: generalize
if( displayed instanceof IAEItemStack )
{
final IAEItemStack ais = (IAEItemStack) displayed;
probeInfo.text( TheOneProbeText.SHOWING.getLocal() + ": " + ais.getItemStack().getDisplayName() );
probeInfo.text( TheOneProbeText.SHOWING.getLocal() + ": " + ais.asItemStackRepresentation().getDisplayName() );
}
else if( displayed instanceof IAEFluidStack )
{
@@ -48,7 +48,8 @@ public class CraftingMonitorInfoProvider implements ITileProbInfoProvider
if( displayStack != null )
{
final ItemStack itemStack = displayStack.getItemStack();
// TODO: check if OK
final ItemStack itemStack = displayStack.asItemStackRepresentation();
final String itemName = itemStack.getDisplayName();
final String formattedCrafting = String.format( TheOneProbeText.CRAFTING.getLocal(), itemName );