forked from Mineclonia/Mineclonia
Fix item frames sometimes destroying placed items
This commit is contained in:
parent
91d04bb2c0
commit
b8b9857957
|
@ -112,12 +112,11 @@ minetest.register_node("itemframes:frame",{
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if clicker:get_player_name() == meta:get_string("owner") then
|
if clicker:get_player_name() == meta:get_string("owner") then
|
||||||
drop_item(pos,node)
|
drop_item(pos,node)
|
||||||
local s = itemstack
|
meta:set_string("item",itemstack:to_string())
|
||||||
|
update_item(pos,node)
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
meta:set_string("item",s:to_string())
|
|
||||||
update_item(pos,node)
|
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue