diff --git a/lib.lua b/lib.lua index 07e47dd..27d5b04 100644 --- a/lib.lua +++ b/lib.lua @@ -170,9 +170,9 @@ end -- Gets the internal identifier of an item - unique (hopefully) per type of item, as defined by NBT, metadata/damage and ID/name local function get_internal_identifier(item) - local n = item.name - if item.damage then n = n .. ":" .. item.damage end - if item.nbtHash then n = n .. "#" .. item.nbtHash end + local n = item.ID + if item.meta then n = n .. ":" .. item.meta end + if item.NBT_hash then n = n .. "#" .. item.NBT_hash end return n end