instead of itemid use the Item system hash. for hash generation purposes should improve lookup type stuff.
This commit is contained in:
parent
a0c15025b7
commit
98f83ad5e4
2 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> 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." );
|
||||
|
|
Loading…
Reference in a new issue