mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-23 20:55:43 +02:00
Refactor builtin_entities.md
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
# Builtin Entities
|
# Builtin Entities
|
||||||
|
|
||||||
Minetest registers two entities by default: Falling nodes and dropped items.
|
Minetest registers two entities by default: Falling nodes and dropped items.
|
||||||
This document describes how they behave and what you can do with them.
|
This document describes how they behave and what you can do with them.
|
||||||
|
|
||||||
## Falling node (`__builtin:falling_node`)
|
## Falling Node (`__builtin:falling_node`)
|
||||||
|
|
||||||
This entity is created by `minetest.check_for_falling` in place of a node
|
This entity is created by `minetest.check_for_falling` in place of a node
|
||||||
with the special group `falling_node=1`. Falling nodes can also be created
|
with the special group `falling_node=1`. Falling nodes can also be created
|
||||||
@@ -24,7 +25,7 @@ Default behavior:
|
|||||||
* If the destination node is a leveled node (`paramtype2="leveled"`) of the
|
* If the destination node is a leveled node (`paramtype2="leveled"`) of the
|
||||||
same node name, the levels of both are summed.
|
same node name, the levels of both are summed.
|
||||||
|
|
||||||
### Entity fields
|
### Entity Fields
|
||||||
|
|
||||||
* `set_node(self, node[, meta])`
|
* `set_node(self, node[, meta])`
|
||||||
* Function to initialize the falling node
|
* Function to initialize the falling node
|
||||||
@@ -35,7 +36,7 @@ Default behavior:
|
|||||||
* `meta`: Node metadata of the falling node. Will be used when the falling
|
* `meta`: Node metadata of the falling node. Will be used when the falling
|
||||||
nodes tries to place itself as a node. Read-only.
|
nodes tries to place itself as a node. Read-only.
|
||||||
|
|
||||||
### Rendering / supported nodes
|
### Rendering / Supported Nodes
|
||||||
|
|
||||||
Falling nodes have visuals to look as close as possible to the original node.
|
Falling nodes have visuals to look as close as possible to the original node.
|
||||||
This works for most drawtypes, but there are limitations.
|
This works for most drawtypes, but there are limitations.
|
||||||
@@ -73,7 +74,7 @@ Supported `paramtype2` values:
|
|||||||
* `color4dir`
|
* `color4dir`
|
||||||
* `color`
|
* `color`
|
||||||
|
|
||||||
## Dropped item stack (`__builtin:item`)
|
## Dropped Item Stack (`__builtin:item`)
|
||||||
|
|
||||||
This is an item stack in a collectable form.
|
This is an item stack in a collectable form.
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ Needs manual initialization when spawned using `/spawnentity`.
|
|||||||
* When it's inside a solid (`walkable=true`) node, it tries to escape to a
|
* When it's inside a solid (`walkable=true`) node, it tries to escape to a
|
||||||
neighboring non-solid (`walkable=false`) node
|
neighboring non-solid (`walkable=false`) node
|
||||||
|
|
||||||
### Entity fields
|
### Entity Fields
|
||||||
|
|
||||||
* `set_item(self, item)`:
|
* `set_item(self, item)`:
|
||||||
* Function to initialize the dropped item
|
* Function to initialize the dropped item
|
||||||
|
Reference in New Issue
Block a user