Module mapgens.singleblock
singleblock mapgen helper
Functions
mapblock_lib.mapgens.singleblock (cfg) | creates a new mapgen-function that generates a single mapblock,
the resulting function can be passed to minetest.register_on_generated |
Functions
- mapblock_lib.mapgens.singleblock (cfg)
-
creates a new mapgen-function that generates a single mapblock,
the resulting function can be passed to
minetest.register_on_generated
Parameters:
- cfg configuration table
- filename the filename of the mapblock to use
- filter
an optional filter function of the type
fn(blockpos)
, returning true means the mapblock is placed - options
optional table for
mapblock_lib.deserialize
Returns:
- the on_generated function or nil on error
- the error or nil
See also:
- cfg configuration table