Mod
Entity node library (
Entity node library
A unified way to create nodes with entity features.
Entity node library (entitynode)
Namespace reference
entitynode = {
register = function(nodename, node_def), -- registers an entity node, almost equivalent to core.register_node (see Additional definition fields)
find = function(pos), -- returns the entity part of a node at pos, or nil if none
entityname = "entitynode:base", -- entity part common registry name
metakey = "entitynode:entity", -- metadata key for entity part guid
group = "entitynode:has_entity", -- group for nodes with an entity part
}
Additional definition fields
node_def = {
...
on_construct = function(pos), -- same as engine on_construct, but gets substituted during registration, so it won't be the same function in core.registered_nodes
on_destruct = function(pos), -- same as engine on_destruct, same as above
_init_entitynode = function(self, staticdata, dtime_s), -- same as on_activate for the entity part
_fin_entitynode = function(self, removal), -- same as on_deactivate for the entity part
_step_entitynode = function(self, dtime, moveresult), -- same as on_step for the entity part
...
}
Entity behavior
The entity part of an entity node:
- doesn't have persistent storage: use the node part's metadata for that
- is only one type
Fields
local entity = {
...
_nodename, -- name of associated node
_def = core.registered_nodes[_nodename], -- definition of associated node
...
} Links
- Source: https://codeberg.org/The4codeblocks/luanti_entity_nodes.git
- Issues: https://codeberg.org/The4codeblocks/luanti_entity_nodes/issues
- Original ContentDB page: content.luanti.org/packages/The4spaceconstants/entitynode/
License
MIT
Development state
ACTIVELY_DEVELOPED
| Version | Date | Min engine | Size | Download |
|---|---|---|---|---|
| 1.1.0.0 | 2026-09-01 02:11:15 | 5.13 | 630.6 KB | Download |