doc/builtin_entities.md
Luanti registers two entities by default: Falling nodes and dropped items. This document describes how they behave and what you can do with them.
__builtin:falling_node)This entity is created by core.check_for_falling in place of a node
with the special group falling_node=1. Falling nodes can also be created
artificially with core.spawn_falling_node.
Needs manual initialization when spawned using /spawnentity.
Default behavior:
movement_gravity setting)walkable nodefloat=1 is set, it also collides with liquid nodes
(nodes with liquidtype ~= "none")walkable) node, it will try to place itself as a
node, replacing the node above.
paramtype2="leveled") of the
same node name, the levels of both are summed.set_node(self, node[, meta])
node and meta are explained below.meta argument is optional.node: Node table of the node (name, param1, param2) that this
entity represents. Read-only.meta: Node metadata of the falling node. Will be used when the falling
nodes tries to place itself as a node. Read-only.Falling nodes have visuals to look as close as possible to the original node. This works for most drawtypes, but there are limitations.
Supported drawtypes:
normalsignliketorchlikenodeboxraillikeglasslikeglasslike_framedglasslike_framed_optionalallfacesallfaces_optionalfirelikemeshfencelikeliquidairlike (not pointable)Other drawtypes still kinda work, but they might look weird.
If the node uses a world-aligned texture with a scale greater
than 1, the falling node will display the top-most, left-most
portion of that texture.
Supported paramtype2 values:
wallmountedfacedir4dircolorwallmountedcolorfacedircolor4dircolor__builtin:item)This is an item stack in a collectable form.
Common cases that spawn a dropped item:
attached_node=1 is removedcore.add_item is calledNeeds manual initialization when spawned using /spawnentity.
item_entity_ttlslippery nodesmovement_gravity setting)walkable nodeswalkable=true) node, it tries to escape to a
neighboring non-solid (walkable=false) nodeset_item(self, item):
item (type ItemStack) specifies the item to representage: Age in seconds. Behavior according to the setting item_entity_ttlitemstring: Itemstring of the item that this item entity represents.
Read-only.Other fields are for internal use only.