Skip to content

Commit 334d8c3

Browse files
p-ouelletteparamat
authored andcommittedJul 8, 2018
Lua_api.txt: Formatting and grammar fixes (#7534)
Use tree output for directory structure. Remove 2 blank lines near document top. Spelling and grammar fixes. Markdown fixes. Condense paths section. Fix skipped heading levels.
1 parent 55b6bc0 commit 334d8c3

File tree

1 file changed

+377
-268
lines changed

1 file changed

+377
-268
lines changed
 

Diff for: ‎doc/lua_api.txt

+377-268
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Minetest Lua Modding API Reference
44
* Developer Wiki: <http://dev.minetest.net/>
55

66

7-
8-
97
Introduction
108
============
119

@@ -34,14 +32,10 @@ the `init.lua` scripts in a shared environment.
3432
Paths
3533
-----
3634
* `RUN_IN_PLACE=1` (Windows release, local build)
37-
* `$path_user`:
38-
* Linux: `<build directory>`
39-
* Windows: `<build directory>`
40-
* `$path_share`
41-
* Linux: `<build directory>`
42-
* Windows: `<build directory>`
35+
* `$path_user`: `<build directory>`
36+
* `$path_share`: `<build directory>`
4337
* `RUN_IN_PLACE=0`: (Linux release)
44-
* `$path_share`
38+
* `$path_share`:
4539
* Linux: `/usr/share/minetest`
4640
* Windows: `<install directory>/minetest-0.4.x`
4741
* `$path_user`:
@@ -79,7 +73,8 @@ The game directory can contain the following files:
7973
texturepack, overriding mod textures.
8074
Any server texturepack will override mod textures and the game texturepack.
8175

82-
### Menu images
76+
Menu images
77+
-----------
8378

8479
Games can provide custom main menu images. They are put inside a `menu`
8580
directory inside the game directory.
@@ -129,7 +124,7 @@ This happens if the following directory exists:
129124

130125
$world/game/
131126

132-
Mods should be then be placed in:
127+
Mods should then be placed in:
133128

134129
$world/game/mods/
135130

@@ -143,20 +138,20 @@ Mod directory structure
143138
-----------------------
144139

145140
mods
146-
|-- modname
147-
| |-- mod.conf
148-
| |-- screenshot.png
149-
| |-- settingtypes.txt
150-
| |-- init.lua
151-
| |-- models
152-
| |-- textures
153-
| | |-- modname_stuff.png
154-
| | `-- modname_something_else.png
155-
| |-- sounds
156-
| |-- media
157-
| |-- locale
158-
| `-- <custom data>
159-
`-- another
141+
├── modname
142+
│   ├── mod.conf
143+
│   ├── screenshot.png
144+
│   ├── settingtypes.txt
145+
│   ├── init.lua
146+
│   ├── models
147+
│   ├── textures
148+
│   │   ├── modname_stuff.png
149+
│   │   └── modname_something_else.png
150+
│   ├── sounds
151+
│   ├── media
152+
│   ├── locale
153+
│   └── <custom data>
154+
└── another
160155

161156
### modname
162157
The location of this directory can be fetched by using
@@ -284,65 +279,64 @@ of the game's nodes are to be used by the core mapgens. For example:
284279

285280
### Aliases needed for all mapgens except Mapgen v6
286281

287-
Base terrain:
288-
289-
"mapgen_stone"
290-
"mapgen_water_source"
291-
"mapgen_river_water_source"
282+
#### Base terrain
283+
* mapgen_stone
284+
* mapgen_water_source
285+
* mapgen_river_water_source
292286

293-
Caves:
294-
295-
"mapgen_lava_source"
296-
297-
Dungeons:
287+
#### Caves
288+
* mapgen_lava_source
298289

290+
#### Dungeons
299291
Only needed for registered biomes where 'node_stone' is stone:
300-
"mapgen_cobble"
301-
"mapgen_stair_cobble"
302-
"mapgen_mossycobble"
303-
Only needed for registered biomes where 'node_stone' is desert stone:
304-
"mapgen_desert_stone"
305-
"mapgen_stair_desert_stone"
306-
Only needed for registered biomes where 'node_stone' is sandstone:
307-
"mapgen_sandstone"
308-
"mapgen_sandstonebrick"
309-
"mapgen_stair_sandstone_block"
310292

311-
### Aliases needed for Mapgen v6
293+
* mapgen_cobble
294+
* mapgen_stair_cobble
295+
* mapgen_mossycobble
312296

313-
Terrain and biomes:
297+
Only needed for registered biomes where 'node_stone' is desert stone:
314298

315-
"mapgen_stone"
316-
"mapgen_water_source"
317-
"mapgen_lava_source"
318-
"mapgen_dirt"
319-
"mapgen_dirt_with_grass"
320-
"mapgen_sand"
321-
"mapgen_gravel"
322-
"mapgen_desert_stone"
323-
"mapgen_desert_sand"
324-
"mapgen_dirt_with_snow"
325-
"mapgen_snowblock"
326-
"mapgen_snow"
327-
"mapgen_ice"
299+
* mapgen_desert_stone
300+
* mapgen_stair_desert_stone
328301

329-
Flora:
302+
Only needed for registered biomes where 'node_stone' is sandstone:
330303

331-
"mapgen_tree"
332-
"mapgen_leaves"
333-
"mapgen_apple"
334-
"mapgen_jungletree"
335-
"mapgen_jungleleaves"
336-
"mapgen_junglegrass"
337-
"mapgen_pine_tree"
338-
"mapgen_pine_needles"
304+
* mapgen_sandstone
305+
* mapgen_sandstonebrick
306+
* mapgen_stair_sandstone_block
339307

340-
Dungeons:
308+
### Aliases needed for Mapgen v6
341309

342-
"mapgen_cobble"
343-
"mapgen_stair_cobble"
344-
"mapgen_mossycobble"
345-
"mapgen_stair_desert_stone"
310+
#### Terrain and biomes
311+
* mapgen_stone
312+
* mapgen_water_source
313+
* mapgen_lava_source
314+
* mapgen_dirt
315+
* mapgen_dirt_with_grass
316+
* mapgen_sand
317+
* mapgen_gravel
318+
* mapgen_desert_stone
319+
* mapgen_desert_sand
320+
* mapgen_dirt_with_snow
321+
* mapgen_snowblock
322+
* mapgen_snow
323+
* mapgen_ice
324+
325+
#### Flora
326+
* mapgen_tree
327+
* mapgen_leaves
328+
* mapgen_apple
329+
* mapgen_jungletree
330+
* mapgen_jungleleaves
331+
* mapgen_junglegrass
332+
* mapgen_pine_tree
333+
* mapgen_pine_needles
334+
335+
#### Dungeons
336+
* mapgen_cobble
337+
* mapgen_stair_cobble
338+
* mapgen_mossycobble
339+
* mapgen_stair_desert_stone
346340

347341

348342

@@ -404,6 +398,7 @@ on top of `cobble.png`.
404398
* `[cracko:<t>:<n>:<p>`
405399

406400
Parameters:
401+
407402
* `<t>` = tile count (in each direction)
408403
* `<n>` = animation frame count
409404
* `<p>` = current animation frame
@@ -537,7 +532,6 @@ The mask is applied using binary AND.
537532
Retrieves a tile at position x,y from the base image
538533
which it assumes to be a tilesheet with dimensions w,h.
539534

540-
541535
#### `[colorize:<color>:<ratio>`
542536
Colorize the textures with the given color.
543537
`<color>` is specified as a `ColorString`.
@@ -573,12 +567,12 @@ the same texture, in different colors, each in a new node/item definition.
573567
When you register an item or node, set its `color` field (which accepts a
574568
`ColorSpec`) to the desired color.
575569

576-
An `ItemStack`s static color can be overwritten by the `color` metadata
570+
An `ItemStack`'s static color can be overwritten by the `color` metadata
577571
field. If you set that field to a `ColorString`, that color will be used.
578572

579573
#### Tile color
580574
Each tile may have an individual static color, which overwrites every
581-
other coloring methods. To disable the coloring of a face,
575+
other coloring method. To disable the coloring of a face,
582576
set its color to white (because multiplying with white does nothing).
583577
You can set the `color` property of the tiles in the node's definition
584578
if the tile is in table format.
@@ -808,7 +802,8 @@ Examples of sound parameter tables:
808802
Looped sounds must either be connected to an object or played locationless to
809803
one player using `to_player = name,`
810804

811-
### `SimpleSoundSpec`
805+
`SimpleSoundSpec`
806+
-----------------
812807
* e.g. `""`
813808
* e.g. `"default_place_node"`
814809
* e.g. `{}`
@@ -819,10 +814,10 @@ one player using `to_player = name,`
819814

820815

821816

822-
Registered definitions of stuff
823-
===============================
817+
Registered definitions
818+
======================
824819

825-
Anything added using certain `minetest.register_*` functions get added to
820+
Anything added using certain `minetest.register_*` functions gets added to
826821
the global `minetest.registered_*` tables.
827822

828823
* `minetest.register_entity(name, prototype table)`
@@ -919,11 +914,11 @@ Nodes are the bulk data of the world: cubes and other things that take the
919914
space of a cube. Huge amounts of them are handled efficiently, but they
920915
are quite static.
921916

922-
The definition of a node is stored and can be accessed by name in
917+
The definition of a node is stored and can be accessed by using
923918

924919
minetest.registered_nodes[node.name]
925920

926-
See "Registered definitions of stuff".
921+
See "Registered definitions".
927922

928923
Nodes are passed by value between Lua and the engine.
929924
They are represented by a table:
@@ -1270,13 +1265,15 @@ Displays distance to selected world position.
12701265
Representations of simple things
12711266
================================
12721267

1273-
### Position/vector
1268+
Position/vector
1269+
---------------
12741270

12751271
{x=num, y=num, z=num}
12761272

12771273
For helper functions see "Spatial Vectors".
12781274

1279-
### `pointed_thing`
1275+
`pointed_thing`
1276+
---------------
12801277
* `{type="nothing"}`
12811278
* `{type="node", under=pos, above=pos}`
12821279
* `{type="object", ref=ObjectRef}`
@@ -1324,15 +1321,17 @@ since, by default, no schematic attributes are set.
13241321
Items
13251322
=====
13261323

1327-
### Item types
1324+
Item types
1325+
----------
13281326
There are three kinds of items: nodes, tools and craftitems.
13291327

13301328
* Node (`register_node`): A node from the world.
13311329
* Tool (`register_tool`): A tool/weapon that can dig and damage
13321330
things according to `tool_capabilities`.
13331331
* Craftitem (`register_craftitem`): A miscellaneous item.
13341332

1335-
### Amount and wear
1333+
Amount and wear
1334+
---------------
13361335
All item stacks have an amount between 0 to 65535. It is 1 by
13371336
default. Tool item stacks can not have an amount greater than 1.
13381337

@@ -1341,11 +1340,12 @@ value 0 is the default and used is for unworn tools. The values
13411340
1 to 65535 are used for worn tools, where a higher value stands for
13421341
a higher wear. Non-tools always have a wear value of 0.
13431342

1344-
### Item formats
1343+
Item formats
1344+
------------
13451345
Items and item stacks can exist in three formats: Serializes, table format
13461346
and `ItemStack`.
13471347

1348-
#### Serialized
1348+
### Serialized
13491349
This is called "stackstring" or "itemstring". It is a simple string with
13501350
1-3 components: the full item identifier, an optional amount and an optional
13511351
wear value. Syntax:
@@ -1359,7 +1359,7 @@ Examples:
13591359
* `'default:pick_stone'`: a new stone pickaxe
13601360
* `'default:pick_wood 1 21323'`: a wooden pickaxe, ca. 1/3 worn out
13611361

1362-
#### Table format
1362+
### Table format
13631363
Examples:
13641364

13651365
5 dirt nodes:
@@ -1374,7 +1374,7 @@ An apple:
13741374

13751375
{name="default:apple", count=1, wear=0, metadata=""}
13761376

1377-
#### `ItemStack`
1377+
### `ItemStack`
13781378
A native C++ format with many helper methods. Useful for converting
13791379
between formats. See the Class reference section for details.
13801380

@@ -1392,7 +1392,8 @@ properties of a thing (item, node, armor of entity, capabilities of
13921392
tool) in such a way that the engine and other mods can can interact with
13931393
the thing without actually knowing what the thing is.
13941394

1395-
### Usage
1395+
Usage
1396+
-----
13961397
Groups are stored in a table, having the group names with keys and the
13971398
group ratings as values. For example:
13981399

@@ -1412,26 +1413,31 @@ You can read the rating of a group for an item or a node by using
14121413

14131414
minetest.get_item_group(itemname, groupname)
14141415

1415-
### Groups of items
1416+
Groups of items
1417+
---------------
14161418
Groups of items can define what kind of an item it is (e.g. wool).
14171419

1418-
### Groups of nodes
1420+
Groups of nodes
1421+
---------------
14191422
In addition to the general item things, groups are used to define whether
14201423
a node is destroyable and how long it takes to destroy by a tool.
14211424

1422-
### Groups of entities
1425+
Groups of entities
1426+
------------------
14231427
For entities, groups are, as of now, used only for calculating damage.
14241428
The rating is the percentage of damage caused by tools with this damage group.
14251429
See "Entity damage mechanism".
14261430

14271431
object.get_armor_groups() --> a group-rating table (e.g. {fleshy=100})
14281432
object.set_armor_groups({fleshy=30, cracky=80})
14291433

1430-
### Groups of tools
1434+
Groups of tools
1435+
---------------
14311436
Groups in tools define which groups of nodes and entities they are
14321437
effective towards.
14331438

1434-
### Groups in crafting recipes
1439+
Groups in crafting recipes
1440+
--------------------------
14351441
An example: Make meat soup from any meat, any water and any bowl:
14361442

14371443
{
@@ -1452,7 +1458,8 @@ Another example: Make red wool from white wool and red dye:
14521458
recipe = {'wool:white', 'group:dye,basecolor_red'},
14531459
}
14541460

1455-
### Special groups
1461+
Special groups
1462+
--------------
14561463
* `immortal`: Disables the group damage system for an entity
14571464
* `punch_operable`: For entities; disables the regular damage mechanism for
14581465
players punching it by hand or a non-tool item, so that it can do something
@@ -1480,7 +1487,8 @@ Another example: Make red wool from white wool and red dye:
14801487
Slipperiness rises steadily with `slippery` value, starting at 1.
14811488

14821489

1483-
### Known damage and digging time defining groups
1490+
Known damage and digging time defining groups
1491+
---------------------------------------------
14841492
* `crumbly`: dirt, sand
14851493
* `cracky`: tough but crackable stuff like stone.
14861494
* `snappy`: something that can be cut using fine tools; e.g. leaves, small
@@ -1496,7 +1504,8 @@ Another example: Make red wool from white wool and red dye:
14961504
speed of a tool if the tool can dig at a faster speed than this
14971505
suggests for the hand.
14981506

1499-
### Examples of custom groups
1507+
Examples of custom groups
1508+
-------------------------
15001509
Item groups are often used for defining, well, _groups of items_.
15011510

15021511
* `meat`: any meat-kind of a thing (rating might define the size or healing
@@ -1510,7 +1519,8 @@ Item groups are often used for defining, well, _groups of items_.
15101519
* `weapon`: any weapon
15111520
* `heavy`: anything considerably heavy
15121521

1513-
### Digging time calculation specifics
1522+
Digging time calculation specifics
1523+
----------------------------------
15141524
Groups such as `crumbly`, `cracky` and `snappy` are used for this
15151525
purpose. Rating is `1`, `2` or `3`. A higher rating for such a group implies
15161526
faster digging time.
@@ -1531,7 +1541,8 @@ groups to enable interaction with tools.
15311541
Tools
15321542
=====
15331543

1534-
#### Tools definition
1544+
Tools definition
1545+
----------------
15351546
Tools define:
15361547

15371548
* Full punch interval
@@ -1542,19 +1553,22 @@ Tools define:
15421553
* Digging times
15431554
* Damage groups
15441555

1545-
#### Full punch interval
1556+
### Full punch interval
1557+
15461558
When used as a weapon, the tool will do full damage if this time is spent
15471559
between punches. If e.g. half the time is spent, the tool will do half
15481560
damage.
15491561

1550-
#### Maximum drop level
1562+
### Maximum drop level
1563+
15511564
Suggests the maximum level of node, when dug with the tool, that will drop
15521565
it's useful item. (e.g. iron ore to drop a lump of iron).
15531566

15541567
This is not automated; it is the responsibility of the node definition
15551568
to implement this.
15561569

1557-
#### Uses
1570+
### Uses
1571+
15581572
Determines how many uses the tool has when it is used for digging a node,
15591573
of this group, of the maximum level. For lower leveled nodes, the use count
15601574
is multiplied by `3^leveldiff`.
@@ -1563,11 +1577,13 @@ is multiplied by `3^leveldiff`.
15631577
* `uses=10, leveldiff=1`: actual uses: 30
15641578
* `uses=10, leveldiff=2`: actual uses: 90
15651579

1566-
#### Maximum level
1580+
### Maximum level
1581+
15671582
Tells what is the maximum level of a node of this group that the tool will
15681583
be able to dig.
15691584

1570-
#### Digging times
1585+
### Digging times
1586+
15711587
List of digging times for different ratings of the group, for nodes of the
15721588
maximum level.
15731589

@@ -1580,10 +1596,12 @@ If the result digging time is 0, a delay of 0.15 seconds is added between
15801596
digging nodes; If the player releases LMB after digging, this delay is set to 0,
15811597
i.e. players can more quickly click the nodes away instead of holding LMB.
15821598

1583-
#### Damage groups
1599+
### Damage groups
1600+
15841601
List of damage for groups of entities. See "Entity damage mechanism".
15851602

1586-
#### Example definition of the capabilities of a tool
1603+
Example definition of the capabilities of a tool
1604+
------------------------------------------------
15871605

15881606
tool_capabilities = {
15891607
full_punch_interval=1.5,
@@ -1763,38 +1781,40 @@ WARNING: Minetest allows you to add elements to every single formspec instance
17631781
using player:set_formspec_prepend(), which may be the reason backgrounds are
17641782
appearing when you don't expect them to. See `no_prepend[]`
17651783

1766-
### Examples
1784+
Examples
1785+
--------
17671786

1768-
#### Chest
1787+
### Chest
17691788

17701789
size[8,9]
17711790
list[context;main;0,0;8,4;]
17721791
list[current_player;main;0,5;8,4;]
17731792

1774-
#### Furnace
1793+
### Furnace
17751794

17761795
size[8,9]
17771796
list[context;fuel;2,3;1,1;]
17781797
list[context;src;2,1;1,1;]
17791798
list[context;dst;5,1;2,2;]
17801799
list[current_player;main;0,5;8,4;]
17811800

1782-
#### Minecraft-like player inventory
1801+
### Minecraft-like player inventory
17831802

17841803
size[8,7.5]
17851804
image[1,0.6;1,2;player.png]
17861805
list[current_player;main;0,3.5;8,4;]
17871806
list[current_player;craft;3,0;3,3;]
17881807
list[current_player;craftpreview;7,1;1,1;]
17891808

1790-
### Elements
1809+
Elements
1810+
--------
17911811

1792-
#### `size[<W>,<H>,<fixed_size>]`
1812+
### `size[<W>,<H>,<fixed_size>]`
17931813
* Define the size of the menu in inventory slots
17941814
* `fixed_size`: `true`/`false` (optional)
17951815
* deprecated: `invsize[<W>,<H>;]`
17961816

1797-
#### `position[<X>,<Y>]`
1817+
### `position[<X>,<Y>]`
17981818
* Must be used after `size` element.
17991819
* Defines the position on the game window of the formspec's `anchor` point.
18001820
* For X and Y, 0.0 and 1.0 represent opposite edges of the game window,
@@ -1803,7 +1823,7 @@ appearing when you don't expect them to. See `no_prepend[]`
18031823
* [1.0, 1.0] sets the position to the bottom right of the game window.
18041824
* Defaults to the center of the game window [0.5, 0.5].
18051825

1806-
#### `anchor[<X>,<Y>]`
1826+
### `anchor[<X>,<Y>]`
18071827
* Must be used after both `size` and `position` (if present) elements.
18081828
* Defines the location of the anchor point within the formspec.
18091829
* For X and Y, 0.0 and 1.0 represent opposite edges of the formspec,
@@ -1815,87 +1835,87 @@ appearing when you don't expect them to. See `no_prepend[]`
18151835
* `position` and `anchor` elements need suitable values to avoid a formspec
18161836
extending off the game window due to particular game window sizes.
18171837

1818-
#### `no_prepend[]`
1838+
### `no_prepend[]`
18191839
* Must be used after the `size`, `position`, and `anchor` elements (if present).
18201840
* Disables player:set_formspec_prepend() from applying to this formspec.
18211841

1822-
#### `container[<X>,<Y>]`
1842+
### `container[<X>,<Y>]`
18231843
* Start of a container block, moves all physical elements in the container by
18241844
(X, Y).
18251845
* Must have matching `container_end`
18261846
* Containers can be nested, in which case the offsets are added
18271847
(child containers are relative to parent containers)
18281848

1829-
#### `container_end[]`
1849+
### `container_end[]`
18301850
* End of a container, following elements are no longer relative to this
18311851
container.
18321852

1833-
#### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;]`
1853+
### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;]`
18341854
* Show an inventory list
18351855

1836-
#### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;<starting item index>]`
1856+
### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;<starting item index>]`
18371857
* Show an inventory list
18381858

1839-
#### `listring[<inventory location>;<list name>]`
1859+
### `listring[<inventory location>;<list name>]`
18401860
* Allows to create a ring of inventory lists
18411861
* Shift-clicking on items in one element of the ring
18421862
will send them to the next inventory list inside the ring
18431863
* The first occurrence of an element inside the ring will
18441864
determine the inventory where items will be sent to
18451865

1846-
#### `listring[]`
1866+
### `listring[]`
18471867
* Shorthand for doing `listring[<inventory location>;<list name>]`
18481868
for the last two inventory lists added by list[...]
18491869

1850-
#### `listcolors[<slot_bg_normal>;<slot_bg_hover>]`
1870+
### `listcolors[<slot_bg_normal>;<slot_bg_hover>]`
18511871
* Sets background color of slots as `ColorString`
18521872
* Sets background color of slots on mouse hovering
18531873

1854-
#### `listcolors[<slot_bg_normal>;<slot_bg_hover>;<slot_border>]`
1874+
### `listcolors[<slot_bg_normal>;<slot_bg_hover>;<slot_border>]`
18551875
* Sets background color of slots as `ColorString`
18561876
* Sets background color of slots on mouse hovering
18571877
* Sets color of slots border
18581878

1859-
#### `listcolors[<slot_bg_normal>;<slot_bg_hover>;<slot_border>;<tooltip_bgcolor>;<tooltip_fontcolor>]`
1879+
### `listcolors[<slot_bg_normal>;<slot_bg_hover>;<slot_border>;<tooltip_bgcolor>;<tooltip_fontcolor>]`
18601880
* Sets background color of slots as `ColorString`
18611881
* Sets background color of slots on mouse hovering
18621882
* Sets color of slots border
18631883
* Sets default background color of tooltips
18641884
* Sets default font color of tooltips
18651885

1866-
#### `tooltip[<gui_element_name>;<tooltip_text>;<bgcolor>;<fontcolor>]`
1886+
### `tooltip[<gui_element_name>;<tooltip_text>;<bgcolor>;<fontcolor>]`
18671887
* Adds tooltip for an element
18681888
* `<bgcolor>` tooltip background color as `ColorString` (optional)
18691889
* `<fontcolor>` tooltip font color as `ColorString` (optional)
18701890

1871-
#### `image[<X>,<Y>;<W>,<H>;<texture name>]`
1891+
### `image[<X>,<Y>;<W>,<H>;<texture name>]`
18721892
* Show an image
18731893
* Position and size units are inventory slots
18741894

1875-
#### `item_image[<X>,<Y>;<W>,<H>;<item name>]`
1895+
### `item_image[<X>,<Y>;<W>,<H>;<item name>]`
18761896
* Show an inventory image of registered item/node
18771897
* Position and size units are inventory slots
18781898

1879-
#### `bgcolor[<color>;<fullscreen>]`
1899+
### `bgcolor[<color>;<fullscreen>]`
18801900
* Sets background color of formspec as `ColorString`
18811901
* If `true`, the background color is drawn fullscreen (does not effect the size
18821902
of the formspec).
18831903

1884-
#### `background[<X>,<Y>;<W>,<H>;<texture name>]`
1904+
### `background[<X>,<Y>;<W>,<H>;<texture name>]`
18851905
* Use a background. Inventory rectangles are not drawn then.
18861906
* Position and size units are inventory slots
18871907
* Example for formspec 8x4 in 16x resolution: image shall be sized
18881908
8 times 16px times 4 times 16px.
18891909

1890-
#### `background[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>]`
1910+
### `background[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>]`
18911911
* Use a background. Inventory rectangles are not drawn then.
18921912
* Position and size units are inventory slots
18931913
* Example for formspec 8x4 in 16x resolution:
18941914
image shall be sized 8 times 16px times 4 times 16px
18951915
* If `true` the background is clipped to formspec size
18961916
(`x` and `y` are used as offset values, `w` and `h` are ignored)
18971917

1898-
#### `pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>]`
1918+
### `pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>]`
18991919
* Textual password style field; will be sent to server when a button is clicked
19001920
* When enter is pressed in field, fields.key_enter_field will be sent with the
19011921
name of this field.
@@ -1907,7 +1927,7 @@ appearing when you don't expect them to. See `no_prepend[]`
19071927
* `label`, if not blank, will be text printed on the top left above the field
19081928
* See field_close_on_enter to stop enter closing the formspec
19091929

1910-
#### `field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
1930+
### `field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
19111931
* Textual field; will be sent to server when a button is clicked
19121932
* When enter is pressed in field, `fields.key_enter_field` will be sent with
19131933
the name of this field.
@@ -1923,7 +1943,7 @@ appearing when you don't expect them to. See `no_prepend[]`
19231943
* **Note**: no extra text or more than a single variable is supported ATM.
19241944
* See `field_close_on_enter` to stop enter closing the formspec
19251945

1926-
#### `field[<name>;<label>;<default>]`
1946+
### `field[<name>;<label>;<default>]`
19271947
* As above, but without position/size units
19281948
* When enter is pressed in field, `fields.key_enter_field` will be sent with
19291949
the name of this field.
@@ -1932,42 +1952,42 @@ appearing when you don't expect them to. See `no_prepend[]`
19321952
* A "Proceed" button will be added automatically
19331953
* See `field_close_on_enter` to stop enter closing the formspec
19341954

1935-
#### `field_close_on_enter[<name>;<close_on_enter>]`
1955+
### `field_close_on_enter[<name>;<close_on_enter>]`
19361956
* <name> is the name of the field
19371957
* if <close_on_enter> is false, pressing enter in the field will submit the
19381958
form but not close it.
19391959
* defaults to true when not specified (ie: no tag for a field)
19401960

1941-
#### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
1961+
### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
19421962
* Same as fields above, but with multi-line input
19431963
* if the text overflows a vertical scrollbar is added
19441964
* if the name is empty the textarea is readonly, the label is not displayed.
19451965

1946-
#### `label[<X>,<Y>;<label>]`
1966+
### `label[<X>,<Y>;<label>]`
19471967
* `x` and `y` work as per field
19481968
* `label` is the text on the label
19491969
* Position and size units are inventory slots
19501970

1951-
#### `vertlabel[<X>,<Y>;<label>]`
1971+
### `vertlabel[<X>,<Y>;<label>]`
19521972
* Textual label drawn vertically
19531973
* `x` and `y` work as per field
19541974
* `label` is the text on the label
19551975
* Position and size units are inventory slots
19561976

1957-
#### `button[<X>,<Y>;<W>,<H>;<name>;<label>]`
1977+
### `button[<X>,<Y>;<W>,<H>;<name>;<label>]`
19581978
* Clickable button. When clicked, fields will be sent.
19591979
* `x`, `y` and `name` work as per field
19601980
* `w` and `h` are the size of the button
19611981
* Fixed button height. It will be vertically centred on `h`
19621982
* `label` is the text on the button
19631983
* Position and size units are inventory slots
19641984

1965-
#### `image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]`
1985+
### `image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]`
19661986
* `x`, `y`, `w`, `h`, and `name` work as per button
19671987
* `texture name` is the filename of an image
19681988
* Position and size units are inventory slots
19691989

1970-
#### `image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>]`
1990+
### `image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>]`
19711991
* `x`, `y`, `w`, `h`, and `name` work as per button
19721992
* `texture name` is the filename of an image
19731993
* Position and size units are inventory slots
@@ -1976,20 +1996,20 @@ appearing when you don't expect them to. See `no_prepend[]`
19761996
* `drawborder`: draw button border or not
19771997
* `pressed texture name` is the filename of an image on pressed state
19781998

1979-
#### `item_image_button[<X>,<Y>;<W>,<H>;<item name>;<name>;<label>]`
1999+
### `item_image_button[<X>,<Y>;<W>,<H>;<item name>;<name>;<label>]`
19802000
* `x`, `y`, `w`, `h`, `name` and `label` work as per button
19812001
* `item name` is the registered name of an item/node,
19822002
tooltip will be made out of its description
19832003
to override it use tooltip element
19842004
* Position and size units are inventory slots
19852005

1986-
#### `button_exit[<X>,<Y>;<W>,<H>;<name>;<label>]`
2006+
### `button_exit[<X>,<Y>;<W>,<H>;<name>;<label>]`
19872007
* When clicked, fields will be sent and the form will quit.
19882008

1989-
#### `image_button_exit[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]`
2009+
### `image_button_exit[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]`
19902010
* When clicked, fields will be sent and the form will quit.
19912011

1992-
#### `textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>]`
2012+
### `textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>]`
19932013
* Scrollable item list showing arbitrary text elements
19942014
* `x` and `y` position the itemlist relative to the top left of the menu
19952015
* `w` and `h` are the size of the itemlist
@@ -1999,7 +2019,7 @@ appearing when you don't expect them to. See `no_prepend[]`
19992019
(only).
20002020
* if you want a listelement to start with "#" write "##".
20012021

2002-
#### `textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>;<selected idx>;<transparent>]`
2022+
### `textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>;<selected idx>;<transparent>]`
20032023
* Scrollable itemlist showing arbitrary text elements
20042024
* `x` and `y` position the item list relative to the top left of the menu
20052025
* `w` and `h` are the size of the item list
@@ -2012,7 +2032,7 @@ appearing when you don't expect them to. See `no_prepend[]`
20122032
* See also `minetest.explode_textlist_event`
20132033
(main menu: `core.explode_textlist_event`).
20142034

2015-
#### `tabheader[<X>,<Y>;<name>;<caption 1>,<caption 2>,...,<caption n>;<current_tab>;<transparent>;<draw_border>]`
2035+
### `tabheader[<X>,<Y>;<name>;<caption 1>,<caption 2>,...,<caption n>;<current_tab>;<transparent>;<draw_border>]`
20162036
* Show a tab**header** at specific position (ignores formsize)
20172037
* `x` and `y` position the itemlist relative to the top left of the menu
20182038
* `name` fieldname data is transferred to Lua
@@ -2021,14 +2041,14 @@ appearing when you don't expect them to. See `no_prepend[]`
20212041
* `transparent` (optional): show transparent
20222042
* `draw_border` (optional): draw border
20232043

2024-
#### `box[<X>,<Y>;<W>,<H>;<color>]`
2044+
### `box[<X>,<Y>;<W>,<H>;<color>]`
20252045
* Simple colored box
20262046
* `x` and `y` position the box relative to the top left of the menu
20272047
* `w` and `h` are the size of box
20282048
* `color` is color specified as a `ColorString`.
20292049
If the alpha component is left blank, the box will be semitransparent.
20302050

2031-
#### `dropdown[<X>,<Y>;<W>;<name>;<item 1>,<item 2>, ...,<item n>;<selected idx>]`
2051+
### `dropdown[<X>,<Y>;<W>;<name>;<item 1>,<item 2>, ...,<item n>;<selected idx>]`
20322052
* Show a dropdown field
20332053
* **Important note**: There are two different operation modes:
20342054
1. handle directly on change (only changed dropdown is submitted)
@@ -2039,14 +2059,14 @@ appearing when you don't expect them to. See `no_prepend[]`
20392059
* Items to be shown in dropdown
20402060
* Index of currently selected dropdown item
20412061

2042-
#### `checkbox[<X>,<Y>;<name>;<label>;<selected>]`
2062+
### `checkbox[<X>,<Y>;<name>;<label>;<selected>]`
20432063
* Show a checkbox
20442064
* `x` and `y`: position of checkbox
20452065
* `name` fieldname data is transferred to Lua
20462066
* `label` to be shown left of checkbox
20472067
* `selected` (optional): `true`/`false`
20482068

2049-
#### `scrollbar[<X>,<Y>;<W>,<H>;<orientation>;<name>;<value>]`
2069+
### `scrollbar[<X>,<Y>;<W>,<H>;<orientation>;<name>;<value>]`
20502070
* Show a scrollbar
20512071
* There are two ways to use it:
20522072
1. handle the changed event (only changed scrollbar is available)
@@ -2059,7 +2079,7 @@ appearing when you don't expect them to. See `no_prepend[]`
20592079
* See also `minetest.explode_scrollbar_event`
20602080
(main menu: `core.explode_scrollbar_event`).
20612081

2062-
#### `table[<X>,<Y>;<W>,<H>;<name>;<cell 1>,<cell 2>,...,<cell n>;<selected idx>]`
2082+
### `table[<X>,<Y>;<W>,<H>;<name>;<cell 1>,<cell 2>,...,<cell n>;<selected idx>]`
20632083
* Show scrollable table using options defined by the previous `tableoptions[]`
20642084
* Displays cells as defined by the previous `tablecolumns[]`
20652085
* `x` and `y`: position the itemlist relative to the top left of the menu
@@ -2070,7 +2090,7 @@ appearing when you don't expect them to. See `no_prepend[]`
20702090
* See also `minetest.explode_table_event`
20712091
(main menu: `core.explode_table_event`).
20722092

2073-
#### `tableoptions[<opt 1>;<opt 2>;...]`
2093+
### `tableoptions[<opt 1>;<opt 2>;...]`
20742094
* Sets options for `table[]`
20752095
* `color=#RRGGBB`
20762096
* default text color (`ColorString`), defaults to `#FFFFFF`
@@ -2086,7 +2106,7 @@ appearing when you don't expect them to. See `no_prepend[]`
20862106
* all subtrees up to `depth < value` are open (default value = `0`)
20872107
* only useful when there is a column of type "tree"
20882108

2089-
#### `tablecolumns[<type 1>,<opt 1a>,<opt 1b>,...;<type 2>,<opt 2a>,<opt 2b>;...]`
2109+
### `tablecolumns[<type 1>,<opt 1a>,<opt 1b>,...;<type 2>,<opt 2a>,<opt 2b>;...]`
20902110
* Sets columns for `table[]`
20912111
* Types: `text`, `image`, `color`, `indent`, `tree`
20922112
* `text`: show cell contents as text
@@ -2145,8 +2165,8 @@ Player Inventory lists
21452165

21462166

21472167

2148-
Colours
2149-
=======
2168+
Colors
2169+
======
21502170

21512171
`ColorString`
21522172
-------------
@@ -2326,7 +2346,8 @@ Translations
23262346
Texts can be translated client-side with the help of `minetest.translate` and
23272347
translation files.
23282348

2329-
### Translating a string
2349+
Translating a string
2350+
--------------------
23302351
Two functions are provided to translate strings: `minetest.translate` and
23312352
`minetest.get_translator`.
23322353

@@ -2368,7 +2389,8 @@ Two functions are provided to translate strings: `minetest.translate` and
23682389

23692390
this will be displayed as "Laine Rouge" on clients with a French locale.
23702391

2371-
### Operations on translated strings
2392+
Operations on translated strings
2393+
--------------------------------
23722394

23732395
The output of `minetest.translate` is a string, with escape sequences adding
23742396
additional information to that string so that it can be translated on the
@@ -2379,7 +2401,8 @@ expected manner. However, string concatenation will still work as expected
23792401
sentences by breaking them into parts; arguments should be used instead), and
23802402
operations such as `minetest.colorize` which are also concatenation.
23812403

2382-
### Translation file format
2404+
Translation file format
2405+
-----------------------
23832406
A translation file has the suffix `.[lang].tr`, where `[lang]` is the language
23842407
it corresponds to. It must be put into the `locale` subdirectory of the mod.
23852408
The file should be a text file, with the following format:
@@ -2393,7 +2416,8 @@ The file should be a text file, with the following format:
23932416
There must be no extraneous whitespace around the `=` or at the beginning or
23942417
the end of the line.
23952418

2396-
### Escapes
2419+
Escapes
2420+
-------
23972421
Strings that need to be translated can contain several escapes, preceded by `@`.
23982422

23992423
* `@@` acts as a literal `@`.
@@ -2421,7 +2445,8 @@ The result is used during map generation to create the terrain shape, vary heat
24212445
and humidity to distribute biomes, vary the density of decorations or vary the
24222446
structure of ores.
24232447

2424-
### Structure of perlin noise
2448+
Structure of perlin noise
2449+
-------------------------
24252450
An 'octave' is a simple noise generator that outputs a value between -1 and 1.
24262451
The smooth wavy noise it generates has a single characteristic scale, almost
24272452
like a 'wavelength', so on its own does not create fine detail.
@@ -2703,15 +2728,17 @@ Decoration types
27032728

27042729
The varying types of decorations that can be placed.
27052730

2706-
### `simple`
2731+
`simple`
2732+
--------
27072733
Creates a 1 times `H` times 1 column of a specified node (or a random node from
27082734
a list, if a decoration list is specified). Can specify a certain node it must
27092735
spawn next to, such as water or lava, for example. Can also generate a
27102736
decoration of random height between a specified lower and upper bound.
27112737
This type of decoration is intended for placement of grass, flowers, cacti,
27122738
papyri, waterlilies and so on.
27132739

2714-
### `schematic`
2740+
`schematic`
2741+
-----------
27152742
Copies a box of `MapNodes` from a specified schematic file (or raw description).
27162743
Can specify a probability of a node randomly appearing when placed.
27172744
This decoration type is intended to be used for multi-node sized discrete
@@ -2774,7 +2801,8 @@ Currently supported flags: `place_center_x`, `place_center_y`, `place_center_z`,
27742801
Lua Voxel Manipulator
27752802
=====================
27762803

2777-
### About VoxelManip
2804+
About VoxelManip
2805+
----------------
27782806
VoxelManip is a scripting interface to the internal 'Map Voxel Manipulator'
27792807
facility. The purpose of this object is for fast, low-level, bulk access to
27802808
reading and writing Map content. As such, setting map nodes through VoxelManip
@@ -2798,7 +2826,8 @@ usage.
27982826
A recent simple test of setting cubic areas showed that `minetest.set_node()`
27992827
is faster than a VoxelManip for a 3x3x3 node cube or smaller.
28002828

2801-
### Using VoxelManip
2829+
Using VoxelManip
2830+
----------------
28022831
A VoxelManip object can be created any time using either:
28032832
`VoxelManip([p1, p2])`, or `minetest.get_voxel_manip([p1, p2])`.
28042833

@@ -2851,7 +2880,7 @@ Once the internal VoxelManip state has been modified to your liking, the
28512880
changes can be committed back to the map by calling `VoxelManip:write_to_map()`
28522881

28532882

2854-
#### Flat array format
2883+
### Flat array format
28552884
Let
28562885
`Nx = p2.X - p1.X + 1`,
28572886
`Ny = p2.Y - p1.Y + 1`, and
@@ -2885,7 +2914,7 @@ Note that this is the same "flat 3D array" format as
28852914
VoxelArea objects (see section 'VoxelArea') can be used to simplify calculation
28862915
of the index for a single point in a flat VoxelManip array.
28872916

2888-
#### Content IDs
2917+
### Content IDs
28892918
A Content ID is a unique integer identifier for a specific node type.
28902919
These IDs are used by VoxelManip in place of the node name string for
28912920
`VoxelManip:get_data()` and `VoxelManip:set_data()`. You can use
@@ -2902,7 +2931,7 @@ The following builtin node types have their Content IDs defined as constants:
29022931
* `minetest.CONTENT_AIR`: ID for "air" nodes
29032932
* `minetest.CONTENT_IGNORE`: ID for "ignore" nodes
29042933

2905-
#### Mapgen VoxelManip objects
2934+
### Mapgen VoxelManip objects
29062935
Inside of `on_generated()` callbacks, it is possible to retrieve the same
29072936
VoxelManip object used by the core's Map Generator (commonly abbreviated
29082937
Mapgen). Most of the rules previously described still apply but with a few
@@ -2926,7 +2955,7 @@ differences:
29262955
necessary to update lighting information using either:
29272956
`VoxelManip:calc_lighting()` or `VoxelManip:set_lighting()`.
29282957

2929-
#### Other API functions operating on a VoxelManip
2958+
### Other API functions operating on a VoxelManip
29302959
If any VoxelManip contents were set to a liquid node,
29312960
`VoxelManip:update_liquids()` must be called for these liquid nodes to begin
29322961
flowing. It is recommended to call this function only after having written all
@@ -2942,7 +2971,7 @@ inside of the specified VoxelManip object.
29422971
directly on the map at the specified position, it will place the schematic
29432972
inside the VoxelManip.
29442973

2945-
#### Notes
2974+
### Notes
29462975
* Attempting to read data from a VoxelManip object before map is read will
29472976
result in a zero-length array table for `VoxelManip:get_data()`, and an
29482977
"ignore" node at any position for `VoxelManip:get_node_at()`.
@@ -2959,7 +2988,8 @@ inside the VoxelManip.
29592988
to write map data to instead of returning a new table each call. This greatly
29602989
enhances performance by avoiding unnecessary memory allocations.
29612990

2962-
### Methods
2991+
Methods
2992+
-------
29632993
* `read_from_map(p1, p2)`: Loads a chunk of map into the VoxelManip object
29642994
containing the region formed by `p1` and `p2`.
29652995
* returns actual emerged `pmin`, actual emerged `pmax`
@@ -3023,12 +3053,13 @@ inside the VoxelManip.
30233053
`minetest.set_data()` on the loaded area elsewhere.
30243054
* `get_emerged_area()`: Returns actual emerged minimum and maximum positions.
30253055

3026-
### `VoxelArea`
3056+
`VoxelArea`
3057+
-----------
30273058
A helper class for voxel areas.
30283059
It can be created via `VoxelArea:new{MinEdge=pmin, MaxEdge=pmax}`.
30293060
The coordinates are *inclusive*, like most other things in Minetest.
30303061

3031-
#### Methods
3062+
### Methods
30323063
* `getExtent()`: returns a 3D vector containing the size of the area formed by
30333064
`MinEdge` and `MaxEdge`.
30343065
* `getVolume()`: returns the volume of the area formed by `MinEdge` and
@@ -3071,26 +3102,32 @@ callback, `nil` is returned.
30713102
The following Mapgen objects are currently available:
30723103

30733104
### `voxelmanip`
3105+
30743106
This returns three values; the `VoxelManip` object to be used, minimum and
30753107
maximum emerged position, in that order. All mapgens support this object.
30763108

30773109
### `heightmap`
3110+
30783111
Returns an array containing the y coordinates of the ground levels of nodes in
30793112
the most recently generated chunk by the current mapgen.
30803113

30813114
### `biomemap`
3115+
30823116
Returns an array containing the biome IDs of nodes in the most recently
30833117
generated chunk by the current mapgen.
30843118

30853119
### `heatmap`
3120+
30863121
Returns an array containing the temperature values of nodes in the most
30873122
recently generated chunk by the current mapgen.
30883123

30893124
### `humiditymap`
3125+
30903126
Returns an array containing the humidity values of nodes in the most recently
30913127
generated chunk by the current mapgen.
30923128

30933129
### `gennotify`
3130+
30943131
Returns a table mapping requested generation notification types to arrays of
30953132
positions at which the corresponding generated structures are located within
30963133
the current chunk. To set the capture of positions of interest to be recorded
@@ -3163,7 +3200,8 @@ Registered entities
31633200
L-system trees
31643201
==============
31653202

3166-
### Tree definition
3203+
Tree definition
3204+
---------------
31673205

31683206
treedef={
31693207
axiom, --string initial tree axiom
@@ -3187,7 +3225,8 @@ L-system trees
31873225
will create one.
31883226
}
31893227

3190-
### Key for Special L-System Symbols used in Axioms
3228+
Key for Special L-System Symbols used in Axioms
3229+
-----------------------------------------------
31913230

31923231
* `G`: move forward one unit with the pen up
31933232
* `F`: move forward one unit with the pen down drawing trunks and branches
@@ -3211,7 +3250,8 @@ L-system trees
32113250
* `[`: save in stack current state info
32123251
* `]`: recover from stack state info
32133252

3214-
### Example
3253+
Example
3254+
-------
32153255
Spawn a small apple tree:
32163256

32173257
pos = {x=230,y=20,z=4}
@@ -3237,7 +3277,8 @@ Spawn a small apple tree:
32373277
'minetest' namespace reference
32383278
==============================
32393279

3240-
### Utilities
3280+
Utilities
3281+
---------
32413282

32423283
* `minetest.get_current_modname()`: returns the currently loading mod's name,
32433284
when loading a mod.
@@ -3327,14 +3368,16 @@ Spawn a small apple tree:
33273368
* `data`: string of data to hash
33283369
* `raw`: return raw bytes instead of hex digits, default: false
33293370

3330-
### Logging
3371+
Logging
3372+
-------
33313373
* `minetest.debug(...)`
33323374
* Equivalent to `minetest.log(table.concat({...}, "\t"))`
33333375
* `minetest.log([level,] text)`
33343376
* `level` is one of `"none"`, `"error"`, `"warning"`, `"action"`,
33353377
`"info"`, or `"verbose"`. Default is `"none"`.
33363378

3337-
### Registration functions
3379+
Registration functions
3380+
----------------------
33383381
Call these functions only at load time!
33393382

33403383
* `minetest.register_entity(name, prototype table)`
@@ -3371,7 +3414,8 @@ Call these functions only at load time!
33713414
* `minetest.clear_registered_biomes()`
33723415
* `minetest.clear_registered_decorations()`
33733416

3374-
### Global callback registration functions
3417+
Global callback registration functions
3418+
--------------------------------------
33753419
Call these functions only at load time!
33763420

33773421
* `minetest.register_globalstep(func(dtime))`
@@ -3524,7 +3568,8 @@ Call these functions only at load time!
35243568
* You should have joined some channels to receive events.
35253569
* If message comes from a server mod, `sender` field is an empty string.
35263570

3527-
### Other registration functions
3571+
Other registration functions
3572+
----------------------------
35283573
* `minetest.register_chatcommand(cmd, chatcommand definition)`
35293574
* Adds definition to `minetest.registered_chatcommands`
35303575
* `minetest.override_chatcommand(name, redefinition)`
@@ -3552,13 +3597,15 @@ Call these functions only at load time!
35523597
* Registers an auth handler that overrides the builtin one
35533598
* This function can be called by a single mod once only.
35543599

3555-
### Setting-related
3600+
Setting-related
3601+
---------------
35563602
* `minetest.settings`: Settings object containing all of the settings from the
35573603
main config file (`minetest.conf`).
35583604
* `minetest.setting_get_pos(name)`: Loads a setting from the main settings and
35593605
parses it as a position (in the format `(1,2,3)`). Returns a position or nil.
35603606

3561-
### Authentication
3607+
Authentication
3608+
--------------
35623609
* `minetest.string_to_privs(str)`: returns `{priv1=true,...}`
35633610
* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."`
35643611
* Convert between two privilege representations
@@ -3606,11 +3653,13 @@ Call these functions only at load time!
36063653
`minetest_get_player_privs` and `minetest.auth_reload` call the authentication
36073654
handler.
36083655

3609-
### Chat
3656+
Chat
3657+
----
36103658
* `minetest.chat_send_all(text)`
36113659
* `minetest.chat_send_player(name, text)`
36123660

3613-
### Environment access
3661+
Environment access
3662+
------------------
36143663
* `minetest.set_node(pos, node)`
36153664
* `minetest.add_node(pos, node): alias to `minetest.set_node`
36163665
* Set node at position `pos`
@@ -3904,7 +3953,8 @@ handler.
39043953
* The spawn level is intentionally above terrain level to cope with
39053954
full-node biome 'dust' nodes.
39063955

3907-
### Mod channels
3956+
Mod channels
3957+
------------
39083958
You can find mod channels communication scheme in `docs/mod_channels.png`.
39093959

39103960
* `minetest.mod_channel_join(channel_name)`
@@ -3913,7 +3963,8 @@ You can find mod channels communication scheme in `docs/mod_channels.png`.
39133963
`minetest.register_on_modchannel_message` call to receive incoming
39143964
messages.
39153965

3916-
### Inventory
3966+
Inventory
3967+
---------
39173968
`minetest.get_inventory(location)`: returns an `InvRef`
39183969

39193970
* `location` = e.g.
@@ -3933,7 +3984,8 @@ You can find mod channels communication scheme in `docs/mod_channels.png`.
39333984
returns left over ItemStack.
39343985
* See `minetest.item_eat` and `minetest.register_on_item_eat`
39353986

3936-
### Formspec
3987+
Formspec
3988+
--------
39373989
* `minetest.show_formspec(playername, formname, formspec)`
39383990
* `playername`: name of player to show formspec
39393991
* `formname`: name passed to `on_player_receive_fields` callbacks.
@@ -3970,7 +4022,8 @@ You can find mod channels communication scheme in `docs/mod_channels.png`.
39704022
* `"CHG"`: has been changed
39714023
* `"VAL"`: not changed
39724024

3973-
### Item handling
4025+
Item handling
4026+
-------------
39744027
* `minetest.inventorycube(img1, img2, img3)`
39754028
* Returns a string for making an image of a cube (useful as an item image)
39764029
* `minetest.get_pointed_thing_position(pointed_thing, above)`
@@ -4064,7 +4117,8 @@ You can find mod channels communication scheme in `docs/mod_channels.png`.
40644117
table and native form.
40654118
* `colorstring`: the new color of the item stack
40664119

4067-
### Rollback
4120+
Rollback
4121+
--------
40684122
* `minetest.rollback_get_node_actions(pos, range, seconds, limit)`:
40694123
returns `{{actor, pos, time, oldnode, newnode}, ...}`
40704124
* Find who has done something to a node, or near a node
@@ -4074,7 +4128,8 @@ You can find mod channels communication scheme in `docs/mod_channels.png`.
40744128
* Revert latest actions of someone
40754129
* `actor`: `"player:<name>"`, also `"liquid"`.
40764130

4077-
### Defaults for the `on_*` item definition functions
4131+
Defaults for the `on_*` item definition functions
4132+
-------------------------------------------------
40784133
These functions return the leftover itemstack.
40794134

40804135
* `minetest.item_place_node(itemstack, placer, pointed_thing[, param2, prevent_after_place])`
@@ -4100,14 +4155,16 @@ These functions return the leftover itemstack.
41004155
different spot. Can be `nil`
41014156
* See `minetest.do_item_eat`
41024157

4103-
### Defaults for the `on_punch` and `on_dig` node definition callbacks
4158+
Defaults for the `on_punch` and `on_dig` node definition callbacks
4159+
------------------------------------------------------------------
41044160
* `minetest.node_punch(pos, node, puncher, pointed_thing)`
41054161
* Calls functions registered by `minetest.register_on_punchnode()`
41064162
* `minetest.node_dig(pos, node, digger)`
41074163
* Checks if node can be dug, puts item into inventory, removes node
41084164
* Calls functions registered by `minetest.registered_on_dignodes()`
41094165

4110-
### Sounds
4166+
Sounds
4167+
------
41114168
* `minetest.sound_play(spec, parameters)`: returns a handle
41124169
* `spec` is a `SimpleSoundSpec`
41134170
* `parameters` is a sound parameter table
@@ -4119,12 +4176,14 @@ These functions return the leftover itemstack.
41194176
the sound volume.
41204177
* `gain` the target gain for the fade.
41214178

4122-
### Timing
4179+
Timing
4180+
------
41234181
* `minetest.after(time, func, ...)`
41244182
* Call the function `func` after `time` seconds, may be fractional
41254183
* Optional: Variable number of arguments that are passed to `func`
41264184

4127-
### Server
4185+
Server
4186+
------
41284187
* `minetest.request_shutdown([message],[reconnect],[delay])`: request for
41294188
server shutdown. Will display `message` to clients.
41304189
* `reconnect` == true displays a reconnect button
@@ -4149,7 +4208,8 @@ These functions return the leftover itemstack.
41494208
* `minetest.remove_player_auth(name)`: remove player authentication data
41504209
* Returns boolean indicating success (false if player nonexistant)
41514210

4152-
### Bans
4211+
Bans
4212+
----
41534213
* `minetest.get_ban_list()`: returns the ban list
41544214
(same as `minetest.get_ban_description("")`).
41554215
* `minetest.get_ban_description(ip_or_name)`: returns ban description (string)
@@ -4158,7 +4218,8 @@ These functions return the leftover itemstack.
41584218
* `minetest.kick_player(name, [reason])`: disconnect a player with a optional
41594219
reason.
41604220

4161-
### Particles
4221+
Particles
4222+
---------
41624223
* `minetest.add_particle(particle definition)`
41634224
* Deprecated: `minetest.add_particle(pos, velocity, acceleration,
41644225
expirationtime, size, collisiondetection, texture, playername)`
@@ -4181,7 +4242,8 @@ These functions return the leftover itemstack.
41814242
* If playername is specified, only deletes on the player's client,
41824243
otherwise on all clients.
41834244

4184-
### Schematics
4245+
Schematics
4246+
----------
41854247
* `minetest.create_schematic(p1, p2, probability_list, filename, slice_prob_list)`
41864248
* Create a schematic from the volume of map specified by the box formed by
41874249
p1 and p2.
@@ -4261,7 +4323,8 @@ These functions return the leftover itemstack.
42614323
the Lua code generated will use that number of spaces as indentation
42624324
instead of a tab character.
42634325

4264-
### HTTP Requests:
4326+
HTTP Requests:
4327+
--------------
42654328
* `minetest.request_http_api()`:
42664329
* returns `HTTPApiTable` containing http functions if the calling mod has
42674330
been granted access by being listed in the `secure.http_mods` or
@@ -4283,12 +4346,14 @@ These functions return the leftover itemstack.
42834346
* `HTTPApiTable.fetch_async_get(handle)`: returns HTTPRequestResult
42844347
* Return response data for given asynchronous HTTP request
42854348

4286-
### Storage API:
4349+
Storage API:
4350+
------------
42874351
* `minetest.get_mod_storage()`:
42884352
* returns reference to mod private `StorageRef`
42894353
* must be called during mod load time
42904354

4291-
### Misc.
4355+
Misc.
4356+
-----
42924357
* `minetest.get_connected_players()`: returns list of `ObjectRefs`
42934358
* `minetest.is_player(o)`: boolean, whether `o` is a player
42944359
* `minetest.player_exists(name)`: boolean, whether player exists
@@ -4456,14 +4521,16 @@ These functions return the leftover itemstack.
44564521
* `minetest.global_exists(name)`
44574522
* Checks if a global variable has been set, without triggering a warning.
44584523

4459-
### Global objects
4524+
Global objects
4525+
--------------
44604526
* `minetest.env`: `EnvRef` of the server environment and world.
44614527
* Any function in the minetest namespace can be called using the syntax
44624528
`minetest.env:somefunction(somearguments)`
44634529
instead of `minetest.somefunction(somearguments)`
44644530
* Deprecated, but support is not to be dropped soon
44654531

4466-
### Global tables
4532+
Global tables
4533+
-------------
44674534
* `minetest.registered_items`
44684535
* Map of registered items, indexed by name
44694536
* `minetest.registered_nodes`
@@ -4495,7 +4562,8 @@ Class reference
44954562

44964563
Sorted alphabetically.
44974564

4498-
### `AreaStore`
4565+
`AreaStore`
4566+
-----------
44994567
A fast access data structure to store areas, and find areas near a given
45004568
position or area.
45014569
Every area has a `data` string attribute to store additional information.
@@ -4504,7 +4572,7 @@ You can create an empty `AreaStore` by calling `AreaStore()`, or
45044572
If you chose the parameter-less constructor, a fast implementation will be
45054573
automatically chosen for you.
45064574

4507-
#### Methods
4575+
### Methods
45084576
* `get_area(id, include_borders, include_data)`: returns the area with the id
45094577
`id`.
45104578
(optional) Boolean values `include_borders` and `include_data` control what's
@@ -4554,10 +4622,11 @@ automatically chosen for you.
45544622
* `from_file(filename)`: Experimental. Like `from_string()`, but reads the data
45554623
from a file.
45564624

4557-
### `InvRef`
4625+
`InvRef`
4626+
--------
45584627
An `InvRef` is a reference to an inventory.
45594628

4560-
#### Methods
4629+
### Methods
45614630
* `is_empty(listname)`: return `true` if list is empty
45624631
* `get_size(listname)`: get size of a list
45634632
* `set_size(listname, size)`: set size of a list
@@ -4587,13 +4656,14 @@ An `InvRef` is a reference to an inventory.
45874656
`minetest.get_inventory(location)`.
45884657
* returns `{type="undefined"}` in case location is not known
45894658

4590-
### `ItemStack`
4659+
`ItemStack`
4660+
-----------
45914661
An `ItemStack` is a stack of items.
45924662

45934663
It can be created via `ItemStack(x)`, where x is an `ItemStack`,
45944664
an itemstring, a table or `nil`.
45954665

4596-
#### Methods
4666+
### Methods
45974667
* `is_empty()`: returns `true` if stack is empty.
45984668
* `get_name()`: returns item name (e.g. `"default:stone"`).
45994669
* `set_name(item_name)`: returns a boolean indicating whether the item was
@@ -4634,21 +4704,23 @@ an itemstring, a table or `nil`.
46344704
* Copy (don't remove) up to `n` items from this stack
46354705
* `n`: number, default: `1`
46364706

4637-
### `ItemStackMetaRef`
4707+
`ItemStackMetaRef`
4708+
------------------
46384709
ItemStack metadata: reference extra data and functionality stored in a stack.
46394710
Can be obtained via `item:get_meta()`.
46404711

4641-
#### Methods
4712+
### Methods
46424713
* All methods in MetaDataRef
46434714
* `set_tool_capabilities([tool_capabilities])`
46444715
* Overrides the item's tool capabilities
46454716
* A nil value will clear the override data and restore the original
46464717
behavior.
46474718

4648-
### `MetaDataRef`
4719+
`MetaDataRef`
4720+
-------------
46494721
See `StorageRef`, `NodeMetaRef`, `ItemStackMetaRef`, and `PlayerMetaRef`.
46504722

4651-
#### Methods
4723+
### Methods
46524724
* `contains(key)`: Returns true if key present, otherwise false.
46534725
* Returns `nil` when the MetaData is inexistent.
46544726
* `get(key)`: Returns `nil` if key not present, else the stored string.
@@ -4668,27 +4740,29 @@ See `StorageRef`, `NodeMetaRef`, `ItemStackMetaRef`, and `PlayerMetaRef`.
46684740
* `equals(other)`
46694741
* returns `true` if this metadata has the same key-value pairs as `other`
46704742

4671-
### ModChannel
4743+
ModChannel
4744+
----------
46724745
An interface to use mod channels on client and server
46734746

4674-
#### Methods
4747+
### Methods
46754748
* `leave()`: leave the mod channel.
46764749
* Server leaves channel `channel_name`.
46774750
* No more incoming or outgoing messages can be sent to this channel from
46784751
server mods.
46794752
* This invalidate all future object usage.
4680-
* Ensure your set mod_channel to nil after that to free Lua resources.
4753+
* Ensure you set mod_channel to nil after that to free Lua resources.
46814754
* `is_writeable()`: returns true if channel is writeable and mod can send over
46824755
it.
46834756
* `send_all(message)`: Send `message` though the mod channel.
46844757
* If mod channel is not writeable or invalid, message will be dropped.
46854758
* Message size is limited to 65535 characters by protocol.
46864759

4687-
### `NodeMetaRef`
4760+
`NodeMetaRef`
4761+
-------------
46884762
Node metadata: reference extra data and functionality stored in a node.
46894763
Can be obtained via `minetest.get_meta(pos)`.
46904764

4691-
#### Methods
4765+
### Methods
46924766
* All methods in MetaDataRef
46934767
* `get_inventory()`: returns `InvRef`
46944768
* `mark_as_private(name or {name1, name2, ...})`: Mark specific vars as private
@@ -4697,11 +4771,12 @@ Can be obtained via `minetest.get_meta(pos)`.
46974771
meaning it's best to call this when initializing all other meta (e.g.
46984772
`on_construct`).
46994773

4700-
### `NodeTimerRef`
4774+
`NodeTimerRef`
4775+
--------------
47014776
Node Timers: a high resolution persistent per-node timer.
47024777
Can be gotten via `minetest.get_node_timer(pos)`.
47034778

4704-
#### Methods
4779+
### Methods
47054780
* `set(timeout,elapsed)`
47064781
* set a timer's state
47074782
* `timeout` is in seconds, and supports fractional values (0.1 etc)
@@ -4721,12 +4796,13 @@ Can be gotten via `minetest.get_node_timer(pos)`.
47214796
* `is_started()`: returns boolean state of timer
47224797
* returns `true` if timer is started, otherwise `false`
47234798

4724-
### `ObjectRef`
4799+
`ObjectRef`
4800+
-----------
47254801
Moving things in the game are generally these.
47264802

47274803
This is basically a reference to a C++ `ServerActiveObject`
47284804

4729-
#### Methods
4805+
### Methods
47304806
* `remove()`: remove object (after returning from Lua)
47314807
* Note: Doesn't work on players, use `minetest.kick_player` instead
47324808
* `get_pos()`: returns `{x=num, y=num, z=num}`
@@ -4787,7 +4863,7 @@ This is basically a reference to a C++ `ServerActiveObject`
47874863
text = "My Nametag",
47884864
}
47894865

4790-
##### LuaEntitySAO-only (no-op for other objects)
4866+
#### LuaEntitySAO-only (no-op for other objects)
47914867
* `set_velocity(vel)`
47924868
* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}`
47934869
* `add_velocity(vel)`
@@ -4814,7 +4890,7 @@ This is basically a reference to a C++ `ServerActiveObject`
48144890
* `get_entity_name()` (**Deprecated**: Will be removed in a future version)
48154891
* `get_luaentity()`
48164892

4817-
##### Player-only (no-op for other objects)
4893+
#### Player-only (no-op for other objects)
48184894
* `get_player_name()`: returns `""` if is not a player
48194895
* `get_player_velocity()`: returns `nil` if is not a player, otherwise a
48204896
table {x, y, z} representing the player's instantaneous velocity in nodes/s
@@ -4960,14 +5036,15 @@ This is basically a reference to a C++ `ServerActiveObject`
49605036
* in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`)
49615037
* `get_eye_offset()`: returns `offset_first` and `offset_third`
49625038

4963-
### `PcgRandom`
5039+
`PcgRandom`
5040+
-----------
49645041
A 32-bit pseudorandom number generator.
49655042
Uses PCG32, an algorithm of the permuted congruential generator family,
49665043
offering very strong randomness.
49675044

49685045
It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`.
49695046

4970-
#### Methods
5047+
### Methods
49715048
* `next()`: return next integer random number [`-2147483648`...`2147483647`]
49725049
* `next(min, max)`: return next integer random number [`min`...`max`]
49735050
* `rand_normal_dist(min, max, num_trials=6)`: return normally distributed
@@ -4977,18 +5054,20 @@ It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`.
49775054
* `variance = (((max - min + 1) ^ 2) - 1) / (12 * num_trials)`
49785055
* Increasing `num_trials` improves accuracy of the approximation
49795056

4980-
### `PerlinNoise`
5057+
`PerlinNoise`
5058+
-------------
49815059
A perlin noise generator.
49825060
It can be created via `PerlinNoise(seed, octaves, persistence, scale)`
49835061
or `PerlinNoise(noiseparams)`.
49845062
Alternatively with `minetest.get_perlin(seeddiff, octaves, persistence, scale)`
49855063
or `minetest.get_perlin(noiseparams)`.
49865064

4987-
#### Methods
5065+
### Methods
49885066
* `get_2d(pos)`: returns 2D noise value at `pos={x=,y=}`
49895067
* `get_3d(pos)`: returns 3D noise value at `pos={x=,y=,z=}`
49905068

4991-
### `PerlinNoiseMap`
5069+
`PerlinNoiseMap`
5070+
----------------
49925071
A fast, bulk perlin noise generator.
49935072

49945073
It can be created via `PerlinNoiseMap(noiseparams, size)` or
@@ -5002,7 +5081,7 @@ For each of the functions with an optional `buffer` parameter: If `buffer` is
50025081
not nil, this table will be used to store the result instead of creating a new
50035082
table.
50045083

5005-
#### Methods
5084+
### Methods
50065085
* `get_2d_map(pos)`: returns a `<size.x>` times `<size.y>` 2D array of 2D noise
50075086
with values starting at `pos={x=,y=}`
50085087
* `get_3d_map(pos)`: returns a `<size.x>` times `<size.y>` times `<size.z>`
@@ -5028,28 +5107,31 @@ table.
50285107
`noise:calc_3d_map({x=1000, y=1000, z=1000})`
50295108
`noisevals = noise:get_map_slice({x=24, z=1}, {x=1, z=1})`
50305109

5031-
### `PlayerMetaRef`
5110+
`PlayerMetaRef`
5111+
---------------
50325112
Player metadata.
50335113
Uses the same method of storage as the deprecated player attribute API, so
50345114
data there will also be in player meta.
50355115
Can be obtained using `player:get_meta()`.
50365116

5037-
#### Methods
5117+
### Methods
50385118
* All methods in MetaDataRef
50395119

5040-
### `PseudoRandom`
5120+
`PseudoRandom`
5121+
--------------
50415122
A 16-bit pseudorandom number generator.
50425123
Uses a well-known LCG algorithm introduced by K&R.
50435124

50445125
It can be created via `PseudoRandom(seed)`.
50455126

5046-
#### Methods
5127+
### Methods
50475128
* `next()`: return next integer random number [`0`...`32767`]
50485129
* `next(min, max)`: return next integer random number [`min`...`max`]
50495130
* `((max - min) == 32767) or ((max-min) <= 6553))` must be true
50505131
due to the simple implementation making bad distribution otherwise.
50515132

5052-
### `Raycast`
5133+
`Raycast`
5134+
---------
50535135
A raycast on the map. It works with selection boxes.
50545136
Can be used as an iterator in a for loop.
50555137

@@ -5065,26 +5147,28 @@ It can be created via `Raycast(pos1, pos2, objects, liquids)` or
50655147
* `objects` : if false, only nodes will be returned. Default is true.
50665148
* `liquids' : if false, liquid nodes won't be returned. Default is false.
50675149

5068-
#### Methods
5150+
### Methods
50695151
* `next()`: returns a `pointed_thing`
50705152
* Returns the next thing pointed by the ray or nil.
50715153

5072-
### `SecureRandom`
5154+
`SecureRandom`
5155+
--------------
50735156
Interface for the operating system's crypto-secure PRNG.
50745157

50755158
It can be created via `SecureRandom()`. The constructor returns nil if a
50765159
secure random device cannot be found on the system.
50775160

5078-
#### Methods
5161+
### Methods
50795162
* `next_bytes([count])`: return next `count` (default 1, capped at 2048) many
50805163
random bytes, as a string.
50815164

5082-
### `Settings`
5165+
`Settings`
5166+
----------
50835167
An interface to read config files in the format of `minetest.conf`.
50845168

50855169
It can be created via `Settings(filename)`.
50865170

5087-
#### Methods
5171+
### Methods
50885172
* `get(key)`: returns a value
50895173
* `get_bool(key, [default])`: returns a boolean
50905174
* `default` is the value returned if `key` is not found.
@@ -5106,11 +5190,12 @@ It can be created via `Settings(filename)`.
51065190
* Writes changes to file.
51075191
* `to_table()`: returns `{[key1]=value1,...}`
51085192

5109-
### `StorageRef`
5193+
`StorageRef`
5194+
------------
51105195
Mod metadata: per mod metadata, saved automatically.
51115196
Can be obtained via `minetest.get_mod_storage()` during load time.
51125197

5113-
#### Methods
5198+
### Methods
51145199
* All methods in MetaDataRef
51155200

51165201

@@ -5119,7 +5204,8 @@ Can be obtained via `minetest.get_mod_storage()` during load time.
51195204
Definition tables
51205205
=================
51215206

5122-
### Object Properties
5207+
Object Properties
5208+
-----------------
51235209

51245210
{
51255211
hp_max = 1,
@@ -5220,7 +5306,8 @@ Definition tables
52205306
-- Defaults to 'true'
52215307
}
52225308

5223-
### Entity definition (`register_entity`)
5309+
Entity definition (`register_entity`)
5310+
-------------------------------------
52245311

52255312
{
52265313
-- Deprecated: Everything in object properties is read directly from here
@@ -5240,7 +5327,8 @@ Definition tables
52405327
-- for more info) by using a '_' prefix.
52415328
}
52425329

5243-
### ABM (ActiveBlockModifier) definition (`register_abm`)
5330+
ABM (ActiveBlockModifier) definition (`register_abm`)
5331+
-----------------------------------------------------
52445332

52455333
{
52465334
label = "Lava cooling",
@@ -5274,7 +5362,8 @@ Definition tables
52745362
loaded mapblocks.
52755363
}
52765364

5277-
### LBM (LoadingBlockModifier) definition (`register_lbm`)
5365+
LBM (LoadingBlockModifier) definition (`register_lbm`)
5366+
------------------------------------------------------
52785367

52795368
{
52805369
label = "Upgrade legacy doors",
@@ -5292,7 +5381,8 @@ Definition tables
52925381
action = func(pos, node),
52935382
}
52945383

5295-
### Item definition (`register_node`, `register_craftitem`, `register_tool`)
5384+
Item definition (`register_node`, `register_craftitem`, `register_tool`)
5385+
------------------------------------------------------------------------
52965386

52975387
{
52985388
description = "Steel Axe",
@@ -5399,7 +5489,8 @@ Definition tables
53995489
]]
54005490
}
54015491

5402-
### Tile definition
5492+
Tile definition
5493+
---------------
54035494
* `"image.png"`
54045495
* `{name="image.png", animation={Tile Animation definition}}`
54055496
* `{name="image.png", backface_culling=bool, tileable_vertical=bool,
@@ -5424,7 +5515,8 @@ Definition tables
54245515
* deprecated, yet still supported field names:
54255516
* `image` (name)
54265517

5427-
### Tile animation definition
5518+
Tile animation definition
5519+
-------------------------
54285520

54295521
{
54305522
type = "vertical_frames",
@@ -5446,7 +5538,8 @@ Definition tables
54465538
-- ^ specify length of a single frame
54475539
}
54485540

5449-
### Node definition (`register_node`)
5541+
Node definition (`register_node`)
5542+
---------------------------------
54505543

54515544
{
54525545
-- <all fields allowed in item definitions>,
@@ -5699,7 +5792,8 @@ Definition tables
56995792
removing the node ]]
57005793
}
57015794

5702-
### Recipe for `register_craft` (shaped)
5795+
Recipe for `register_craft` (shaped)
5796+
------------------------------------
57035797

57045798
{
57055799
output = 'default:pick_stone',
@@ -5712,7 +5806,8 @@ Definition tables
57125806
replace one input item with another item on crafting>]]
57135807
}
57145808

5715-
### Recipe for `register_craft` (shapeless)
5809+
Recipe for `register_craft` (shapeless)
5810+
---------------------------------------
57165811

57175812
{
57185813
type = "shapeless",
@@ -5726,14 +5821,16 @@ Definition tables
57265821
replace one input item with another item on crafting>]]
57275822
}
57285823

5729-
### Recipe for `register_craft` (tool repair)
5824+
Recipe for `register_craft` (tool repair)
5825+
-----------------------------------------
57305826

57315827
{
57325828
type = "toolrepair",
57335829
additional_wear = -0.02,
57345830
}
57355831

5736-
### Recipe for `register_craft` (cooking)
5832+
Recipe for `register_craft` (cooking)
5833+
-------------------------------------
57375834

57385835
{
57395836
type = "cooking",
@@ -5742,15 +5839,17 @@ Definition tables
57425839
cooktime = 3,
57435840
}
57445841

5745-
### Recipe for `register_craft` (furnace fuel)
5842+
Recipe for `register_craft` (furnace fuel)
5843+
------------------------------------------
57465844

57475845
{
57485846
type = "fuel",
57495847
recipe = "default:leaves",
57505848
burntime = 1,
57515849
}
57525850

5753-
### Ore definition (`register_ore`)
5851+
Ore definition (`register_ore`)
5852+
-------------------------------
57545853

57555854
See 'Ore types' section above for essential information.
57565855

@@ -5838,7 +5937,8 @@ Definition tables
58385937
-- ^ The above 2 parameters are only valid for "stratum" ore.
58395938
}
58405939

5841-
### Biome definition (`register_biome`)
5940+
Biome definition (`register_biome`)
5941+
-----------------------------------
58425942

58435943
{
58445944
name = "tundra",
@@ -5903,7 +6003,8 @@ Definition tables
59036003
-- ^ 0 and 100 but can exceed these values.
59046004
}
59056005

5906-
### Decoration definition (`register_decoration`)
6006+
Decoration definition (`register_decoration`)
6007+
---------------------------------------------
59076008

59086009
{
59096010
deco_type = "simple", -- See "Decoration types"
@@ -6034,7 +6135,8 @@ Definition tables
60346135
-- ^ to the 'place_on' node.
60356136
}
60366137

6037-
### Chat command definition (`register_chatcommand`)
6138+
Chat command definition (`register_chatcommand`)
6139+
------------------------------------------------
60386140

60396141
{
60406142
params = "<name> <privilege>", -- Short parameter description
@@ -6057,7 +6159,8 @@ Note that in params, use of symbols is as follows:
60576159
* `()` signifies grouping. For example, when param1 and param2 are both
60586160
required, or only param3 is required: `(<param1> <param2>) | <param3>`
60596161

6060-
### Detached inventory callbacks
6162+
Detached inventory callbacks
6163+
----------------------------
60616164

60626165
{
60636166
allow_move = func(inv, from_list, from_index, to_list, to_index, count, player),
@@ -6082,7 +6185,8 @@ Note that in params, use of symbols is as follows:
60826185
-- ^ No return value
60836186
}
60846187

6085-
### HUD Definition (`hud_add`, `hud_get`)
6188+
HUD Definition (`hud_add`, `hud_get`)
6189+
-------------------------------------
60866190

60876191
{
60886192
hud_elem_type = "image", -- see HUD element types
@@ -6106,7 +6210,8 @@ Note that in params, use of symbols is as follows:
61066210
-- ^ Size of element in pixels
61076211
}
61086212

6109-
### Particle definition (`add_particle`)
6213+
Particle definition (`add_particle`)
6214+
------------------------------------
61106215

61116216
{
61126217
pos = {x=0, y=0, z=0},
@@ -6135,7 +6240,8 @@ Note that in params, use of symbols is as follows:
61356240
}
61366241

61376242

6138-
### `ParticleSpawner` definition (`add_particlespawner`)
6243+
`ParticleSpawner` definition (`add_particlespawner`)
6244+
----------------------------------------------------
61396245

61406246
{
61416247
amount = 1,
@@ -6178,7 +6284,8 @@ Note that in params, use of symbols is as follows:
61786284
-- ^ Values 0-14.
61796285
}
61806286

6181-
### `HTTPRequest` definition (`HTTPApiTable.fetch_async`, `HTTPApiTable.fetch_async`)
6287+
`HTTPRequest` definition (`HTTPApiTable.fetch_async`, `HTTPApiTable.fetch_async`)
6288+
---------------------------------------------------------------------------------
61826289

61836290
{
61846291
url = "http://example.org",
@@ -6201,7 +6308,8 @@ Note that in params, use of symbols is as follows:
62016308
-- ^ Default is false.
62026309
}
62036310

6204-
### `HTTPRequestResult` definition (`HTTPApiTable.fetch` callback, `HTTPApiTable.fetch_async_get`)
6311+
`HTTPRequestResult` definition (`HTTPApiTable.fetch` callback, `HTTPApiTable.fetch_async_get`)
6312+
----------------------------------------------------------------------------------------------
62056313

62066314
{
62076315
completed = true,
@@ -6216,7 +6324,8 @@ Note that in params, use of symbols is as follows:
62166324
data = "response"
62176325
}
62186326

6219-
### Authentication handler definition
6327+
Authentication handler definition
6328+
---------------------------------
62206329

62216330
{
62226331
get_auth = func(name),

0 commit comments

Comments
 (0)
Please sign in to comment.