Skip to content
Browse files
Lua_api.txt: Add documentation of required mapgen aliases
  • Loading branch information
paramat committed Nov 13, 2017
1 parent 66ec50d commit 4d83eb796b317901df3b2be8f3c8ace339f9bb95
Showing 1 changed file with 73 additions and 1 deletion.
@@ -214,7 +214,8 @@ when registering it.

The `:` prefix can also be used for maintaining backwards compatibility.

### 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:





Only needed for registered biomes where 'node_stone' is stone:
Only needed for registered biomes where 'node_stone' is desert stone:
Only needed for registered biomes where 'node_stone' is sandstone:

### Aliases needed for Mapgen v6

Terrain and biomes:






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.

0 comments on commit 4d83eb7

Please sign in to comment.