When applying bonemeal to eg. farm crops, these have a chance to grow in
response to the application of bone meal. When a node can be bonemealed, the
applied bone meal item should always be spent after using it, regardless of
the results. Currently this does not work correctly, if the result of
bonemealing has no effect on the node, the used bone meal item is not spent.
This commit fixes the behavior of the bone meal item to always be taken when
used on a node that defines a `_mcl_on_bonemealing()` callback.
The nodes that implement the callback imay use the handler's return value
only to signal if the bonemealing was succesful, not to signal if it was at
all possible. For this reason, some nodes need to be made more strictly
conforming to the API.
* Always take the used bone meal item (if user is not in creative mode),
regardless of whether the bonemealed node's handler returned `true`.
* Make dispensers spawn particles after succesful bonemealing.
* Trivial comment fix.
* Ripe cocoa pod cannot be bonemealed.
* Update API.md to describe the stricter API semantics.
* Add `mcl_cocoas:coca_beans` craftitem to mcl_cocoas.
* Remove `mcl_dye:brown` craftitem from mcl_dye.
* Move cocoa beans translations from mcl_dye to mcl_cocoas.
* Add `mcl_dye:brown` alias for `mcl_cocoas:cocoa_beans` to
mcl_dye.
* Abstract cocoa pod node registration into a loop.
* Update chocolate cookies crafting recipe in mcl_farming.
* Bonemealing dirt_with_grass spawns new growth over a wide area, so it
looks better if we spawn a few more extra bone meal particles.
* Update mod.conf depends to mcl_bone_meal.
* Update to use new mcl_bone_meal API:
* Use new bone meal item and remove related comment.
* Update mod depends in mod.conf
* Spelling fixes: s/bonemeal/bone meal/g
* New mod mcl_bone_meal, replacing bone meal functionality previously
held in mcl_dye.
* Improve bonemealing API using callbacks in the nodes that support
bonemealing.
* Rename bone meal item to `"mcl_bone_meal:bone_meal"` and updated its
crafting recipe.
* Implement legacy compatibility for older bone meal API.
* Remove all non dye-related bone meal code, texture and translations from
mcl_dye.
* Add legacy compatibility shims to mcl_dye that refer to mcl_bone_meal.
* Add an alias for "mcl_dye:white" to keep mcl_dye and its API working
uniterrupted.
* Update mod depends in mcl_dye mod.conf.
* Add new file mcl_flowers/bonemeal.lua, containing the bonemealing
callback for "mcl_core:dirt_with_grass".
* Override "mcl_core:dirt_with_grass" with a _mcl_on_bonemealing handler
calling a function defined in mcl_flowers. This sidesteps the problem
that bonemealing a node from mcl_core needs knowledge of mcl_flowers,
which would create a circular dependency. H/t to cora for suggesting
this solution. H/t to wsor for suggesting a solution that also works.
* Abstract unripe beetroot plant node registrations into a single
indexed definition and do the registration in a loop.
* Adds a _mcl_on_bonemealing callback to the unripe melon plants.
Cleanup of mods/ITEMS/mcl_core/functions.lua
This improves several further ABMs such as vine growing, and uses the `vector` API instead of tables.
Reviewed-on: VoxeLibre/VoxeLibre#4592
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
This modifies the behavior of kelp and bamboo so that neither breaks when an unloaded node is encountered.
Reviewed-on: VoxeLibre/VoxeLibre#4551
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
The mycelium ABM has been left untouched because of the potential destructiveness. If we ever find that to be an issue, it can be fixed as part of a bigger PR.
Reviewed-on: VoxeLibre/VoxeLibre#4629
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Fixes a warning.
Mobs spawners really only need to check the entity `.is_mob` as all mobs should have this set.
Reviewed-on: VoxeLibre/VoxeLibre#4501
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: WillConker <willconker@noreply.git.minetest.land>
Co-committed-by: WillConker <willconker@noreply.git.minetest.land>
- local functions, as they are not called by anywhere else
- delay water check of reed, first check height
- reduce number of get_node calls (for height 1,2,3 the old code used 4,5,4 calls, the new only 2,3,3)
- cane growth rate is also reduced
This will make the ABM cheaper.
Reviewed-on: VoxeLibre/VoxeLibre#4590
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>