typoozle
This commit is contained in:
parent
9025d5dcaa
commit
6f697a6e43
2
lib.lua
2
lib.lua
@ -180,7 +180,7 @@ end
|
|||||||
-- Inverse of get_internal_identifier - parses that kind of string into ID/meta/NBT
|
-- Inverse of get_internal_identifier - parses that kind of string into ID/meta/NBT
|
||||||
local function string_to_item(s)
|
local function string_to_item(s)
|
||||||
local mod, item, meta, NBT = string.match(s, "(%a+):(%a+):([0-9]+)#([0-9a-f]+)")
|
local mod, item, meta, NBT = string.match(s, "(%a+):(%a+):([0-9]+)#([0-9a-f]+)")
|
||||||
if not mod or not item or not meta then error(w.errors.make(w.errors.INTERNAL, "string did not match regex")) 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 = meta, NBT = NBT }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user