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:

  1. the on_generated function or nil on error
  2. the error or nil

See also:

generated by LDoc 1.4.6 Last updated 2023-03-30 05:48:06