nextUniqueID = tagIDsets.get(item).nextClearBit(1);
tagIDsets.get(item).set(nextUniqueID);
} else {
nextUniqueID = r.uniqueID;
}
FinalNBTTagCompound finaltag = new FinalNBTTagCompound((NBTTagCompound)tag.copy());
ItemKey realKey = new ItemKey(item, damage, finaltag);
ItemIdentifier ret = new ItemIdentifier(item, damage, finaltag, nextUniqueID);
keyRefMap.put(realKey, new IDReference(realKey, nextUniqueID, ret));
keyRefWlock.unlock();
return ret;