You will need to edit your tree mods to register leafdecay for each tree type, details are below and in game_api.txt.
Apologies for the disruption, we think is it is worth it to finally remove this ABM.
Originally leafdecay used a 'trunk cache' to try to reduce processing, this was removed a while ago due to the cache using huge amounts of memory, to compensate the ABM was slowed down but was still very intensive. Also, we have recently increased the default active block radius so the ABM had become more intensive.
99+% of the time the ABM was running for no reason, leafdecay only needed to happen when trunks were removed nearby. When the ABM was removing leaves it was slow because it has to be tuned to not be too intensive, because it ran all the time.
The new nodetimers ensure that all leaves disappear within the specified time of 12sec, instead of a few always remaining for a long time due to random removal. Leafdecay will now be faster and guaranteed within 12sec, meaning if the player immediately walks away all leaves will decay by the time the player leaves the active block radius (48 nodes by default).
Because trunk nodes and leaf nodes are registered for each other, this means that if two different tree types are intersecting, removing the trunks of one tree type will only remove leaves belonging to that tree.
Registering leafdecay (from game_api.txt)
-----------------------------------------------------
To enable leaf decay for leaves when a tree is cut down by a player,
register the tree with the default.register_leafdecay(leafdecaydef)
function.
If `param2` of any registered node is ~= 0, the node will always be
preserved. Thus, if the player places a node of that kind, you will
want to set `param2 = 1` or so.
The function `default.after_place_leaves` can be set as
`after_place_node of a node` to set param2 to 1 if the player places
the node (should not be used for nodes that use param2 otherwise
(e.g. facedir)).
If the node is in the `leafdecay_drop` group then it will always be
dropped as an item.
`default.register_leafdecay(leafdecaydef)`
`leafdecaydef` is a table, with following members:
{
trunks = {"default:tree"}, -- nodes considered trunks
leaves = {"default:leaves", "default:apple"},
-- nodes considered for removal
radius = 3, -- radius to consider for searching
}
Note: all the listed nodes in `trunks` have their `on_after_destruct`
callback overridden. All the nodes listed in `leaves` have their
`on_timer` callback overridden.
Example (from nodes.lua)
---------------------------------
- Code: Select all
if minetest.get_mapgen_setting("mg_name") == "v6" then
default.register_leafdecay({
trunks = {"default:tree"},
leaves = {"default:apple", "default:leaves"},
radius = 2,
})
default.register_leafdecay({
trunks = {"default:jungletree"},
leaves = {"default:jungleleaves"},
radius = 3,
})
default.register_leafdecay({
trunks = {"default:pine_tree"},
leaves = {"default:pine_needles"},
radius = 3,
})
else
default.register_leafdecay({
trunks = {"default:tree"},
leaves = {"default:apple", "default:leaves"},
radius = 3,
})
default.register_leafdecay({
trunks = {"default:jungletree"},
leaves = {"default:jungleleaves"},
radius = 2,
})
default.register_leafdecay({
trunks = {"default:pine_tree"},
leaves = {"default:pine_needles"},
radius = 2,
})
end
default.register_leafdecay({
trunks = {"default:acacia_tree"},
leaves = {"default:acacia_leaves"},
radius = 2,
})
default.register_leafdecay({
trunks = {"default:aspen_tree"},
leaves = {"default:aspen_leaves"},
radius = 3,
})
'radius' should be set to the maximum distance of leaves from trunks, this will usually be the same as the value of the 'leafdecay' group.
If anyone has questions please ask here.