~fgaz/minetest-falling_nodes

bc3f7e69d37dc8acb8bf500c5750932c1498e290 — Francesco Gazzetta 6 months ago fb380a4
Clone only clones materials
1 files changed, 3 insertions(+), 2 deletions(-)

M mods/falling_nodes/materials.lua
M mods/falling_nodes/materials.lua => mods/falling_nodes/materials.lua +3 -2
@@ 94,8 94,9 @@ minetest.register_node("falling_nodes:clone", {
  on_rightclick = function(pos, _node, _clicker, itemstack)
    if not itemstack or itemstack:is_empty() then return end
    local itemname = itemstack:get_name()
    -- TODO only set items from the falling_nodes (?) group
    minetest.get_meta(pos):set_string("cloned", itemname)
    if minetest.get_item_group(itemname, "falling_nodes:material") == 1 then
      minetest.get_meta(pos):set_string("cloned", itemname)
    end
    return itemstack
  end,
})