Also save the name when a shulker is placed
Previously only the description was saved in the node meta.
This commit is contained in:
parent
6095ae17b1
commit
37c05cb840
|
@ -839,6 +839,7 @@ for color, desc in pairs(boxtypes) do
|
||||||
local imeta = stack:get_meta()
|
local imeta = stack:get_meta()
|
||||||
local nmeta = minetest.get_meta(droppos)
|
local nmeta = minetest.get_meta(droppos)
|
||||||
nmeta:set_string("description", imeta:get_string("description"))
|
nmeta:set_string("description", imeta:get_string("description"))
|
||||||
|
nmeta:set_string("name", imeta:get_string("name"))
|
||||||
|
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
end
|
end
|
||||||
|
@ -854,6 +855,7 @@ for color, desc in pairs(boxtypes) do
|
||||||
|
|
||||||
local imeta = itemstack:get_meta()
|
local imeta = itemstack:get_meta()
|
||||||
nmeta:set_string("description", imeta:get_string("description"))
|
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 minetest.is_creative_enabled(placer:get_player_name()) then
|
||||||
if not ninv:is_empty("main") then
|
if not ninv:is_empty("main") then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user