Skip to content

Commit

Permalink
Documentation update.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfence committed Aug 11, 2024
1 parent 5d4b5cc commit 56b674d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions doc/lua_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5629,8 +5629,11 @@ Call these functions only at load time!
`name` from `minetest.registered_items` and from the associated item table
according to its nature: `minetest.registered_nodes`, etc.
* `minetest.register_entity(name, entity definition)`
* `minetest.override_entity(name, entity definition)`
* `minetest.register_abm(abm definition)`
* `minetest.override_abm(name, abm definition)`
* `minetest.register_lbm(lbm definition)`
* `minetest.override_lbm(name, lbm definition)`
* `minetest.register_alias(alias, original_name)`
* Also use this to set the 'mapgen aliases' needed in a game for the core
mapgens. See [Mapgen aliases] section above.
Expand Down Expand Up @@ -8898,7 +8901,7 @@ Player properties need to be saved manually.
Entity definition
-----------------

Used by `minetest.register_entity`.
Used by `minetest.register_entity` and `minetest.override_entity`.

```lua
{
Expand Down Expand Up @@ -8933,14 +8936,18 @@ Used by `minetest.register_entity`.
ABM (ActiveBlockModifier) definition
------------------------------------

Used by `minetest.register_abm`.
Used by `minetest.register_abm` and `minetest.override_abm`.

```lua
{
label = "Lava cooling",
-- Descriptive label for profiling purposes (optional).
-- Definitions with identical labels will be listed as one.

name = "modname:replace_legacy_door",
-- Optional filed, required for make ABM overridable.
-- Identifier of the ABM, should follow the modname:<whatever> convention.

nodenames = {"default:lava_source"},
-- Apply `action` function to these nodes.
-- `group:groupname` can also be used here.
Expand Down Expand Up @@ -8982,7 +8989,7 @@ Used by `minetest.register_abm`.
LBM (LoadingBlockModifier) definition
-------------------------------------

Used by `minetest.register_lbm`.
Used by `minetest.register_lbm` and `minetest.override_lbm`.

A loading block modifier (LBM) is used to define a function that is called for
specific nodes (defined by `nodenames`) when a mapblock which contains such nodes
Expand All @@ -8995,7 +9002,8 @@ gets activated (not loaded!)
-- Definitions with identical labels will be listed as one.

name = "modname:replace_legacy_door",
-- Identifier of the LBM, should follow the modname:<whatever> convention
-- Identifier of the LBM, should follow the modname:<whatever> convention.
-- Also used for overriding LBM.

nodenames = {"default:lava_source"},
-- List of node names to trigger the LBM on.
Expand Down

0 comments on commit 56b674d

Please sign in to comment.