Some drawtypes have not been explained yet,
and placeholder images are being used.
Introduction
In this chapter we explain all the different types of node drawtypes there are.
First of all, what is a drawtype?
A drawtype defines how the node is to be drawn.
A torch looks different to water, water looks different to stone.
The string you use to determine the drawtype in the node definition is the same as
the title of the sections, except in lower case.
Normal
Airlike
Liquid
FlowingLiquid
Glasslike
Glasslike_Framed
Glasslike_Framed_Optional
Allfaces
Allfaces_Optional
Torchlike
Nodebox
This article is not complete yet. These drawtypes are missing:
Signlike
Plantlike
Firelike
Fencelike
Raillike
Mesh
Normal
This is, well, the normal drawtypes.
Nodes that use this will be cubes with textures for each side, simple-as.
Here is the example from the Nodes, Items and Crafting chapter.
Notice how you don’t need to declare the drawtype.
Airlike
These nodes are see through and thus have no textures.
Liquid
These nodes are complete liquid nodes, the liquid flows outwards from position
using the flowing liquid drawtype.
For each liquid node you should also have a flowing liquid node.
FlowingLiquid
See default:water_flowing in the default mod in minetest_game, it is mostly
the same as the above example.
Glasslike
When you place multiple glasslike nodes together, you’ll notice that the internal
edges are hidden, like this:
Glasslike_Framed
This makes the node’s edge go around the whole thing with a 3D effect, rather
than individual nodes, like the following:
Glasslike_Framed_Optional
“optional” drawtypes need less rendering time if deactivated on the client’s side.
Allfaces
Allfaces nodes are partially transparent nodes - they have holes on
the faces - which show every single face of the cube, even if sides are
up against another node (which would normally be hidden).
Leaves in vanilla minetest_game use this drawtype.
Allfaces_Optional
Allows clients to disable it using new_style_leaves = 0, requiring less rendering time.
TorchLike
TorchLike nodes are 2D nodes which allow you to have different textures
depending on whether they are placed against a wall, on the floor, or on the ceiling.
TorchLike nodes are not restricted to torches, you could use them for switches or other
items which need to have different textures depending on where they are placed.
Nodebox
Nodeboxes allow you to create a node which is not cubic, but is instead made out
of as many cuboids as you like.
The most important part is the nodebox table:
Each row is a cubiod which are joined to make a single node.
The first three numbers are the co-ordinates, from -0.5 to 0.5 inclusive, of
the bottom front left most corner, the last three numbers are the opposite corner.
They are in the form X, Y, Z, where Y is up.
You can use the NodeBoxEditor to
create node boxes by dragging the edges, it is more visual than doing it by hand.
Wallmounted Nodebox
Sometimes you want different nodeboxes for when it is placed on the floor, wall, or ceiling like with torches.