This commit is contained in:
Elias Åström 2022-02-12 19:29:17 +01:00
parent f3c814bf8f
commit d898b02c8b

View file

@ -14,10 +14,11 @@ end
function mcl_enchanting.unload_enchantments(itemstack)
local itemdef = itemstack:get_definition()
if itemdef.tool_capabilities then
itemstack:get_meta():set_tool_capabilities(nil)
end
local meta = itemstack:get_meta()
if itemdef.tool_capabilities then
meta:set_tool_capabilities(nil)
meta:set_string("groupcaps_hash", "")
end
if meta:get_string("name") == "" then
meta:set_string("description", "")
meta:set_string("groupcaps_hash", "")