diff --git a/api.lua b/api.lua index a017b28..e96d60b 100644 --- a/api.lua +++ b/api.lua @@ -204,7 +204,7 @@ function itemshelf.register_shelf(name, def) x=math.random(pos.x - 0.5, pos.x + 0.5), y=pos.y, z=math.random(pos.z - 0.5, pos.z + 0.5)} - minetest.add_item(pos, item:get_name()) + minetest.add_item(pos, item:to_string()) end -- Remove node minetest.remove_node(pos) @@ -218,7 +218,7 @@ function itemshelf.register_shelf(name, def) x=math.random(pos.x - 0.5, pos.x + 0.5), y=pos.y, z=math.random(pos.z - 0.5, pos.z + 0.5)} - minetest.add_item(pos, item:get_name()) + minetest.add_item(pos, item:to_string()) end -- Remove node minetest.remove_node(pos)