Closed VorTechnix closed 9 months ago
Uh oh! Okay. So this bug has 2 facets to it:
//bonemeal
→ //flora
when //bonemeal
doesn't exist//bonemeal
doesn't work in MineClone 2This is an easy fix. I'll address this asap.
This is much harder. WorldEditAdditions doesn't actually hit a specific bonemeal item.... it uses API of TenPlus1's bonemeal
mod:
...specifically, we call bonemeal:on_use(pos, strength, node)
.
To this end, if MCL 2 has a different bonemeal mod registered then we would need to inspect the API thereof to add support for that different bonemeal mod.
Do you have a link to the documentation or source code of the MCL2 bonemeal mod at all please?
Pushed commit 873ff4bef899e674c18f7cceedcba8ec128a36d8 to the dev branch. Can you confirm this fixes the warning please @VorTechnix?
Do you have a link to the documentation or source code of the MCL2 bonemeal mod at all please?
Certainly! I've been rooting around in it a lot for my farm building project.
API (it's part of mcl_dye right now but will become its own API in the future): https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ITEMS/mcl_dye/API.md
Item def: https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ITEMS/mcl_dye/init.lua#L391
Pushed commit 873ff4b to the dev branch. Can you confirm this fixes the warning please @VorTechnix?
Yup, it's fixed in dev branch.
Thanks for that link @VorTechnix. The API there is horrible though >_<
Looks like it's not documented but one can call mcl_dye.apply_bone_meal(pointed_thing, user)
...but we don't necessarily have a user
when applying bonemeal. We could probably fake pointed_thing
, but fiddling the user may break the callbacks in unpredictable ways.
Unfortunately it looks like until the MineClone2 team refactor to allow the application of bonemeal without a user
object we're kinda stuck here.
Marking as upstream and closing for now, but we can reopen if/when upstream refactors to make MineClone2 bonemeal support more viable.
Reproduction steps: Steps to reproduce the behaviour:
Bonemeal in Mineclone is called
mcl_bone_meal:bone_meal
so that needs to be looked for/handled.Also the alias shouldn't try to register if the base command doesn't exist (how did we forget to check for that? 🤦♂️). Bonemeal is supposed to be an optional dependency.