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
@@ -126,8 +126,7 @@ public class TesrRenderHelper
*/
public static void renderItem2dWithAmount( IAEItemStack itemStack, float itemScale, float spacing )
{
final ItemStack renderStack = itemStack.getItemStack();
renderStack.setCount( 1 );
final ItemStack renderStack = itemStack.asItemStackRepresentation();
TesrRenderHelper.renderItem2d( renderStack, itemScale );
@@ -46,8 +46,7 @@ public class AssemblerFX extends Particle implements ICanDie
this.motionY = 0;
this.motionZ = 0;
this.speed = speed;
final ItemStack displayItem = is.getItemStack();
displayItem.setCount( 1 );
final ItemStack displayItem = is.asItemStackRepresentation();
this.fi = new EntityFloatingItem( this, w, x, y, z, displayItem );
w.spawnEntity( this.fi );
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;