From 08b48859bc1e9dbf81c1b70b34f4a6099a47774e Mon Sep 17 00:00:00 2001 From: osmarks Date: Wed, 15 Aug 2018 07:28:33 +0100 Subject: [PATCH] Fix string_to_item --- lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.lua b/lib.lua index 113deb6..36d80a3 100644 --- a/lib.lua +++ b/lib.lua @@ -182,7 +182,7 @@ local function string_to_item(s) local mod, item, meta, NBT = string.match(s, "(%a+):(%a+):([0-9]+)#([0-9a-f]+)") if not NBT then mod, item, meta = string.match(s, "(%a+):(%a+):([0-9]+)") end if not mod or not item or not meta then error(errors.make(errors.INTERNAL, "string did not match regex")) end - return { ID = mod .. ":" .. item, meta = meta, NBT = NBT } + return { ID = mod .. ":" .. item, meta = tonumber(meta), NBT = NBT } end -- GENERAL STUFF