Interesting how you did it. You just permanently query the right mouse button of all players. Damn, why didn't I have this idea earlier? xD
Still, I think in the long run an engine change is inevitable to keep the complexity outside of Lua:
https://github.com/minetest/minetest/issues/5212But thanks for finding this little trick. It seems to work just fine.
The mod still needs some work IMO.
The arrow physics feel very wrong. The arrow just flies very slowly, compared to other bow mods.
Another problem with this mod is that it touches the player physics directly which automatically makes this mod incompatible with all mods which also alter player physics.
This looks like just what I needed for MCL2. I will probably not use this mod verbatim, but I might eventually just adapt your rightclick trick.
And here I give my standard request to write a few help texts for the items, using the mod doc_items from the
Help modpack. Here's the doc_items API documentation (the quick start is enough):
http://repo.or.cz/minetest_doc_items.gi ... AD:/API.mdPS: Just because some idea is from another game doesn't mean it's a bad idea. The fact that it's from MC should NOT matter at all, the only thing which matters is whether you consider it a good gameplay mechanic (or not).
I think fluid charging is generally a much needed feature in MT. In fact, that's the whole point of having a bow in the first place! Almost all past bow mods just had a single fixed bow strength which is definitely not something to be proud of.