Also save the name when a shulker is placed

Previously only the description was saved in the node meta.
This commit is contained in:
Elias Åström 2020-07-26 18:00:31 +02:00
parent 6095ae17b1
commit 37c05cb840
1 changed files with 2 additions and 0 deletions

View File

@ -839,6 +839,7 @@ for color, desc in pairs(boxtypes) do
local imeta = stack:get_meta()
local nmeta = minetest.get_meta(droppos)
nmeta:set_string("description", imeta:get_string("description"))
nmeta:set_string("name", imeta:get_string("name"))
stack:take_item()
end
@ -854,6 +855,7 @@ for color, desc in pairs(boxtypes) do
local imeta = itemstack:get_meta()
nmeta:set_string("description", imeta:get_string("description"))
nmeta:set_string("name", imeta:get_string("name"))
if minetest.is_creative_enabled(placer:get_player_name()) then
if not ninv:is_empty("main") then