summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-11-12 19:10:08 +0000
committerparamat <mat.gregory@virginmedia.com>2017-11-13 03:40:11 +0000
commit4d83eb796b317901df3b2be8f3c8ace339f9bb95 (patch)
tree18fec0a807b7ccc7ad5a0bf21058e8e8455536c9 /doc
parent66ec50db3a07f863ee0dd4ea12da4421917ae3bc (diff)
downloadminetest-4d83eb796b317901df3b2be8f3c8ace339f9bb95.tar.gz
minetest-4d83eb796b317901df3b2be8f3c8ace339f9bb95.tar.bz2
minetest-4d83eb796b317901df3b2be8f3c8ace339f9bb95.zip
Lua_api.txt: Add documentation of required mapgen aliases
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt74
1 files changed, 73 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 9f92aba99..c811085a2 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -214,7 +214,8 @@ when registering it.
The `:` prefix can also be used for maintaining backwards compatibility.
-### Aliases
+Aliases
+-------
Aliases can be added by using `minetest.register_alias(name, convert_to)` or
`minetest.register_alias_force(name, convert_to)`.
@@ -235,6 +236,75 @@ you have an item called `epiclylongmodname:stuff`, you could do
and be able to use `/giveme stuff`.
+Mapgen aliases
+--------------
+In a game, a certain number of these must be set to tell core mapgens which
+of the game's nodes are to be used by the core mapgens. For example:
+
+ minetest.register_alias("mapgen_stone", "default:stone")
+
+### Aliases needed for all mapgens except Mapgen v6
+
+Base terrain:
+
+"mapgen_stone"
+"mapgen_water_source"
+"mapgen_river_water_source"
+
+Caves:
+
+"mapgen_lava_source"
+
+Dungeons:
+
+Only needed for registered biomes where 'node_stone' is stone:
+"mapgen_cobble"
+"mapgen_stair_cobble"
+"mapgen_mossycobble"
+Only needed for registered biomes where 'node_stone' is desert stone:
+"mapgen_desert_stone"
+"mapgen_stair_desert_stone"
+Only needed for registered biomes where 'node_stone' is sandstone:
+"mapgen_sandstone"
+"mapgen_sandstonebrick"
+"mapgen_stair_sandstone_block"
+
+### Aliases needed for Mapgen v6
+
+Terrain and biomes:
+
+"mapgen_stone"
+"mapgen_water_source"
+"mapgen_lava_source"
+"mapgen_dirt"
+"mapgen_dirt_with_grass"
+"mapgen_sand"
+"mapgen_gravel"
+"mapgen_desert_stone"
+"mapgen_desert_sand"
+"mapgen_dirt_with_snow"
+"mapgen_snowblock"
+"mapgen_snow"
+"mapgen_ice"
+
+Flora:
+
+"mapgen_tree"
+"mapgen_leaves"
+"mapgen_apple"
+"mapgen_jungletree"
+"mapgen_jungleleaves"
+"mapgen_junglegrass"
+"mapgen_pine_tree"
+"mapgen_pine_needles"
+
+Dungeons:
+
+"mapgen_cobble"
+"mapgen_stair_cobble"
+"mapgen_mossycobble"
+"mapgen_stair_desert_stone"
+
Textures
--------
Mods should generally prefix their textures with `modname_`, e.g. given
@@ -2417,6 +2487,8 @@ Call these functions only at load time!
* `minetest.register_craftitem(name, item definition)`
* `minetest.unregister_item(name)`
* `minetest.register_alias(name, convert_to)`
+ * Also use this to set the 'mapgen aliases' needed in a game for the core
+ * mapgens. See 'Mapgen aliases' section above.
* `minetest.register_alias_force(name, convert_to)`
* `minetest.register_craft(recipe)`
* Check recipe table syntax for different types below.