Java Code Examples for openmods.utils.ItemUtils#getNBTHash()
The following examples show how to use
openmods.utils.ItemUtils#getNBTHash() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ItemFingerprint.java From OpenPeripheral-Integration with MIT License | 5 votes |
public ItemFingerprint(ItemStack stack) { String itemId = GameData.getItemRegistry().getNameForObject(stack.getItem()); this.id = new UniqueIdentifier(itemId); this.damage = stack.getItemDamage(); NBTTagCompound tag = stack.getTagCompound(); this.nbtHash = tag != null? ItemUtils.getNBTHash(tag) : null; }
Example 2
Source File: FingerprintMetaProvider.java From OpenPeripheral-Integration with MIT License | 4 votes |
@Override public Object getMeta(Item target, ItemStack stack) { final NBTTagCompound tag = stack.getTagCompound(); return tag != null? ItemUtils.getNBTHash(tag) : null; }
Example 3
Source File: ItemFingerprint.java From OpenPeripheral-Integration with MIT License | 4 votes |
public ItemFingerprint(Item item, int damage, NBTTagCompound tag) { String itemId = GameData.getItemRegistry().getNameForObject(item); this.id = new UniqueIdentifier(itemId); this.damage = damage; this.nbtHash = tag != null? ItemUtils.getNBTHash(tag) : null; }