mirror of
https://github.com/mt-mods/moretrees.git
synced 2024-12-27 03:00:24 +01:00
use table.copy instead of clone-node
This commit is contained in:
parent
acb534d8d0
commit
dde035cb5e
11
init.lua
11
init.lua
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user