use clone-node method to redefine apple

(only way to add a new group item, for compat with rubenwardy's food mod)
This commit is contained in:
Vanessa Ezekowitz
2015-07-30 09:42:47 -04:00
parent 8276d82bac
commit ba170ee66e
2 changed files with 14 additions and 3 deletions

View File

@ -52,6 +52,17 @@ 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 minetest.setting_getbool("creative_mode") then