-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlbm.lua
23 lines (22 loc) · 934 Bytes
/
lbm.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---@meta
---LBM (LoadingBlockModifier) definition
----------------------------------------
-- Used by `minetest.register_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
-- gets activated (not loaded!).
---@class mt.LBMDef
-- Descriptive label for profiling purposes (optional).
-- Definitions with identical labels will be listed as one.
---@field label string|nil
---@field name string
-- * List of node names to trigger the LBM on.
-- * Also non-registered nodes will work.
-- * Groups (as of group:groupname) will work as well.
---@field nodenames string[]
-- Whether to run the LBM's action every time a block gets activated,
-- and not only the first time the block gets activated after the LBM
-- was introduced.
---@field run_at_every_load boolean
---@field action fun(pos:mt.Vector, node:mt.Node)