minetest.set_mapgen_params

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

mapgen_params = { mgname = ..., seed = ..., water_level = ..., flags = ... }
minetest.set_mapgen_params(mapgen_params)

Description

Available in 0.4.10+

Sets map generation parameters. Cannot be called after the registration period; only initialization and on_mapgen_init (calls made elsewhere will not have any effect).

If there are multiple callbacks registered to run on_mapgen_init and there are multiple calls to minetest.set_mapgen_params(), the effective parameter modification is the one passed to the most recent call to minetest.set_mapgen_params(). Also, since parameter modification does not take effect until after all on_mapgen_init callbacks have been completed, prior staged changes are not visible to later callbacks.

  • mapgen_params — Table of mapgen parameters. Fields that are unset/nil leave that parameter unchanged.
    • mgname — Name of the mapgen to use (e.g. "singlenode", "v6", "v7").
    • seed — Seed
    • water_level — Water level.
    • flags — 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.

See Also


This article is incomplete.




This article is missing examples, feel free to add them.


Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox