

#Minetest carts mod mod#
See default:water_flowing in the default mod in minetest_game for a full example. register_node ( "myair:air", )įlowing nodes have a similar definition, but with a different name and animation. You can use the allfaces_optional drawtype to allow users to opt-out of the slower drawing, in which case it’ll act like a normal node. This is good for nodes with partially transparent sides, such as leaf nodes. In contrast, the allfaces drawtype will still render the inner side when up against a solid node. If the side of a normal node is against a solid side, then that side won’t be rendered, resulting in a large performance gain. The normal drawtype is typically used to render a cubic node. Target: Run smoothly as possible, even on laggy servers. param1 is used to store the lighting of a node, and the meaning of param2 depends on the paramtype2 property of the node type definition.Ĭubic Nodes: Normal and Allfaces Normal Drawtype Based on (and fully compatible with) the mod 'carts' by PilzAdam and the one contained in the game Minetest Game. The node params are used to control how a node is individually rendered. The function minetest.register_node is a bit misleading in that it doesn’t actually register a node - it registers a new type of node. Each position is called a node, and consists of the node type (name) and two parameters (param1 and param2).

The Minetest world is a 3D grid of positions. In the previous chapter, the concept of nodes and items was introduced, but a full definition of a node wasn’t given. It is possible to control some properties per-node using something called param2.

These properties are fixed for all instances of this node. The behaviour of a drawtype can be controlled by providing properties in the node type definition. The method by which a node is drawn is called a drawtype.
