Double save anvil-given name

This commit is contained in:
Wuzzy 2018-02-02 04:19:40 +01:00
parent a7190a3693
commit 87ef954409

View file

@ -41,7 +41,10 @@ local function update_anvil_slots(meta)
local meta = name_item:get_meta() local meta = name_item:get_meta()
-- Limit name length -- Limit name length
new_name = string.sub(new_name, 1, 30) new_name = string.sub(new_name, 1, 30)
-- Rename item
meta:set_string("description", new_name) meta:set_string("description", new_name)
-- Double-save the name internally, too
meta:set_string("name", new_name)
new_output = name_item new_output = name_item
else else
new_output = "" new_output = ""