diff options
author | mgl <> | 2014-09-10 17:17:16 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-09-10 17:17:41 -0400 |
commit | 54458de4617888c5f9552ffe1ebf472819613dbf (patch) | |
tree | 2658bf520de57b21cdd523c3a7dc0fc730807428 | |
parent | 3e490f1aa5f493c239b722ea62c2f99c7b4801eb (diff) |
Add missing leafdecay for nature_classic apple blossoms, if present
-rw-r--r-- | leafdecay.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/leafdecay.lua b/leafdecay.lua index 9d771d7..04ee711 100644 --- a/leafdecay.lua +++ b/leafdecay.lua @@ -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, |