diff --git a/util/item/AEItemDef.java b/util/item/AEItemDef.java index bcdd2ac7..bb7800ef 100644 --- a/util/item/AEItemDef.java +++ b/util/item/AEItemDef.java @@ -37,17 +37,20 @@ public class AEItemDef static AESharedNBT lowTag = new AESharedNBT( Integer.MIN_VALUE ); static AESharedNBT highTag = new AESharedNBT( Integer.MAX_VALUE ); + public AEItemDef(Item it) { + item = it; + itemID = System.identityHashCode( item ); + } + public AEItemDef copy() { - AEItemDef t = new AEItemDef(); + AEItemDef t = new AEItemDef( item ); t.def = def; - t.item = item; t.damageValue = damageValue; t.dspDamage = dspDamage; t.maxDamage = maxDamage; t.tagCompound = tagCompound; t.isOre = isOre; - t.itemID = itemID; return t; } diff --git a/util/item/AEItemStack.java b/util/item/AEItemStack.java index 3f7dce11..5defa307 100644 --- a/util/item/AEItemStack.java +++ b/util/item/AEItemStack.java @@ -57,8 +57,7 @@ public final class AEItemStack extends AEStack implements IAEItemS if ( is == null ) throw new RuntimeException( "Invalid Itemstack." ); - def = new AEItemDef(); - def.item = is.getItem(); + def = new AEItemDef( is.getItem() ); if ( def.item == null ) throw new RuntimeException( "This ItemStack is bad, it has a null item." );