This commit adds a couple of lines to the `mcl_mapgen_core:fix_foliage_palette_indexes"` LBM, which ensures that player leaves which were placed before this update get converted into the new player leaves.
I would have included mangrove leaves, but decided against it because of an issue where the `param2` of mangrove leaves was accidentally set to 1 (in the schematics?). This meant that if I included mangrove leaves, the LBM would have converted the natural leaves as well.
This would have made it very tedious to clean up the leaves after chopping down a mangrove tree, since these would not rot by themselves.
This commit makes it so the LBMs don't run at every load.
This commit also adds some new `minetest.register_on_generated()` code, which should ensure that any newly generated mapblocks have the correct foliage colours.
This commit adds 1 new LBM (for foliage) and 2 new ABMs (one for foliage, and one for grass).
This also adds a new generator so any new maps created will have biome coloured leaves with a faster method. (Vines are excluded from this generator since I don't know yet how to get those to work with this.)
Since some people complained about the LBM running at every load, I changed it so it only runs once instead. It shouldn't even need to run more than once anyways, unless somebody could prove the contrary.
this is a somewhat ugly hack that uses minetest.generate_decorations
which generates decorations regardless of biome so additional steps
had to be taken to ensure no other decorations "spill over" due to
this.
I discovered this when I attempted to register an lvm in a mod that was intended to run after "main", to modify clay that the main mapgen lvm adds to the world. It wasn't finding any clay because priority was being ignored and it was running before "main" was.
"#registered_generators" was attempting to count a non-array table and was always returning 0. So every node function registered was named "mod_1" and overwrote each other in that index.
also, "nodes" wasn't counting node_functions, it was counting lvm_functions.