use table.copy instead of clone-node

This commit is contained in:
Vanessa Dannenberg 2019-06-18 14:37:06 -04:00
parent acb534d8d0
commit dde035cb5e
2 changed files with 1 additions and 12 deletions

View File

@ -36,17 +36,6 @@ else
end
moretrees.intllib = S
-- clone node
function moretrees.clone_node(name)
local node2 = {}
local node = minetest.registered_nodes[name]
for k,v in pairs(node) do
node2[k]=v
end
return node2
end
-- infinite stacks checking
if minetest.get_modpath("unified_inventory") or not

View File

@ -404,7 +404,7 @@ default.register_leafdecay({
if moretrees.enable_redefine_apple then
local appledef = moretrees.clone_node("default:apple")
local appledef = table.copy(minetest.registered_nodes["default:apple"])
appledef.groups.attached_node = 1
minetest.register_node(":default:apple", appledef)
end