From 5dba54b9336d0f1b0cfd80fd2d59fe2bc70efefc Mon Sep 17 00:00:00 2001 From: osmarks Date: Mon, 13 Aug 2018 08:59:10 +0100 Subject: [PATCH] fix internal identifiers --- lib.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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