Add missing leafdecay for nature_classic apple blossoms, if present

This commit is contained in:
mgl 2014-09-10 17:17:16 -04:00 committed by Vanessa Ezekowitz
parent 3e490f1aa5
commit 54458de461

View File

@ -86,8 +86,22 @@ if moretrees.enable_default_leafdecay then
})
end
if moretrees.enable_default_jungle_leafdecay then
-- Decay apple tree blossoms from nature_classic mod
if minetest.get_modpath("nature_classic") then
minetest.register_abm({
nodenames = "moretrees:apple_blossoms",
interval = moretrees.default_leafdecay_delay,
chance = moretrees.default_leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.leafdecay_radius, { "ignore", "moretrees:apple_tree_trunk" }) then return end
process_drops(pos, "moretrees:apple_tree_leaves")
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end
if moretrees.enable_default_jungle_leafdecay then
minetest.register_abm({
nodenames = "default:jungleleaves",
interval = moretrees.default_jungle_leafdecay_delay,