minetest.register on mapgen init

Description

 * Available in 0.4.8+

Registers a callback that is called after mods initially run but before the environment is created, while the mapgen is being initialized. This allows modification of map generation parameters via minetest.set_mapgen_params and registration of additional decorations, nodes, etc. required by the mapgen.


 * — Table of mapgen parameters. Fields that are unset/nil leave that parameter unchanged.
 * — Name of the mapgen to use (e.g. "singlenode", "v6", "v7"). Same format and options as "mg_name" in minetest.conf
 * — Seed
 * — Water level.
 * — Comma-delimited string of flags to set. Clears a flag if the prefix "no" is added.  Same format and options as "mg_flags" in minetest.conf.

Note that this callback is the correct place for a mod to determine and override map generation parameters; reading the configuration file for parameter overrides is incorrect, since there are many other sources from which the mapgen parameters could be set.

==See Also==
 * Mapgen Parameters