💾 Archived View for gemini.minetest.land › docs › engine › builtin_entities.txt captured on 2022-04-28 at 18:07:47.

View Raw

More Information

-=-=-=-=-=-=-

# Builtin Entities
Minetest registers two entities by default: Falling nodes and dropped items.
This document describes how they behave and what you can do with them.

## Falling node (`__builtin:falling_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
artificially with `minetest.spawn_falling_node`.

Needs manual initialization when spawned using `/spawnentity`.

Default behaviour:


  node, replacing the node above.
    * If the falling node cannot replace the destination node, it is dropped.
    * If the destination node is a leveled node (`paramtype2="leveled"`) of the
      same node name, the levels of both are summed.

### Entity fields


    * Function to initialize the falling node
    * `node` and `meta` are explained below.
    * The `meta` argument is optional.

  entity represents. Read-only.

  nodes tries to place itself as a node. Read-only.

### Rendering / supported nodes

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:



Other drawtypes still kinda work, but they might look weird.

Supported `paramtype2` values:



## Dropped item stack (`__builtin:item`)

This is an item stack in a collectable form.

Common cases that spawn a dropped item:



Needs manual initialization when spawned using `/spawnentity`.

### Behavior


  neighboring non-solid (`walkable=false`) node

### Entity fields


    * Function to initialize the dropped item
    * `item` (type `ItemStack`) specifies the item to represent

  Read-only.

Other fields are for internal use only.