interval = 60,
chance = 15,
action = function(pos, node)
- local meta = minetest.get_meta(pos)
- if meta:get_int("placed") ~= 0 then
- return
+ if minetest.find_node_near(pos, (moretrees and moretrees.leafdecay_radius) or 5, {"moretrees:rubber_tree_leaves"}) then
+ node.name = "moretrees:rubber_tree_trunk"
+ minetest.swap_node(pos, node)
end
- minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"})
end
})
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_leaves", {