This mod causes fruits on trees from various other mods to regrow like apples in the 5.0 release of Minetest Game. It also offers a small API to add fruit regrowth quickly.
If the fruit was placed by hand or the tree was chopped down, the fruit won't grow back. There is also a small chance that regrowth will stop randomly, so trees will bear less fruit over time.
Currently supported mods/modpacks are: `default`, `ethereal`, `cool_trees`, `moretrees`, `farming_plus`, `multibiomegen`, `australia` and `aotearoa`.
The standard regrowth time can be changed in settings (via `min_regrow_interval` and `max_regrow_interval`) as well as the chance of regrowth stopping (`regrowth_stop_chance`).
Ideas, bug reports or requests for more mod support are always welcome in the [Minetest Forum topic](https://forum.minetest.net/viewtopic.php?f=9&t=24986) or via the [Git Issue Tracker](https://git.sp-codes.de/minetest/regrowing_fruits/issues)!
The `regrowing_fruits.add()` function overrides the fruits `after_dig_node` function and registers a placeholder node that will be placed once the fruit is taken and regrows the fruit after a timer expires.
*`leafname`: nodename of the corresponding leaves (used as a reference whether tree is still alive).
*`param2`: param2 value of fruit when placed naturally (not by player). Defaults to 0; -1 disables param2 checks for fruit regrowth (use this if your fruit has different rotations). If set, overrides `after_place_node` of fruit node to be able to differentiate fruits by param2 when placed by player.
*`multiplier`: multiplier for the standard average regrowth time.