Skip to content

Commit a016b64

Browse files
committedSep 19, 2017
Rooted plantlike drawtype: Add remaining documentation
Plus a small clarification of 'glasslike framed' documentation.
1 parent d8f20d0 commit a016b64

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed
 

Diff for: ‎doc/lua_api.txt

+20-9
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,11 @@ node definition:
827827
Leveled nodebox:
828828
The level of the top face of the nodebox is stored in param2.
829829
The other faces are defined by 'fixed = {}' like 'type = "fixed"' nodeboxes.
830-
The nodebox height is param2 / 64 nodes.
830+
The nodebox height is (param2 / 64) nodes.
831831
The maximum accepted value of param2 is 127.
832832
Rooted plantlike:
833833
The height of the 'plantlike' section is stored in param2.
834-
The height is param2 / 16 nodes.
835-
The maximum accepted value of param2 is 127.
834+
The height is (param2 / 16) nodes.
836835
paramtype2 == "degrotate"
837836
^ The rotation of this node is stored in param2. Plants are rotated this way.
838837
Values range 0 - 179. The value stored in param2 is multiplied by two to
@@ -868,13 +867,14 @@ node definition:
868867
The palette should have 32 pixels.
869868
paramtype2 == "glasslikeliquidlevel"
870869
^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
871-
param2 defines 64 levels of internal liquid.
870+
param2 values 0-63 define 64 levels of internal liquid, 0 being empty and
871+
63 being full.
872872
Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`
873873

874874
Nodes can also contain extra data. See "Node Metadata".
875875

876876
Node drawtypes
877-
---------------
877+
--------------
878878
There are a bunch of different looking node types.
879879

880880
Look for examples in `games/minimal` or `games/minetest_game`.
@@ -895,13 +895,13 @@ Look for examples in `games/minimal` or `games/minetest_game`.
895895
* `fencelike`
896896
* `raillike`
897897
* `nodebox` -- See below
898-
* `mesh` -- Use models for nodes
899-
* `plantlike_rooted`
898+
* `mesh` -- Use models for nodes, see below
899+
* `plantlike_rooted` -- See below
900900

901901
`*_optional` drawtypes need less rendering time if deactivated (always client side).
902902

903903
Node boxes
904-
-----------
904+
----------
905905
Node selection boxes are defined using "node boxes"
906906

907907
The `nodebox` node drawtype allows defining nodes consisting of an arbitrary
@@ -955,13 +955,24 @@ A box of a regular node would look like:
955955

956956
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
957957

958-
959958
Meshes
960959
------
961960
If drawtype `mesh` is used, tiles should hold model materials textures.
962961
Only static meshes are implemented.
963962
For supported model formats see Irrlicht engine documentation.
964963

964+
Rooted plantlike drawtype
965+
-------------------------
966+
The `plantlike_rooted` drawtype was developed to enable underwater plants
967+
without air bubbles around the plants.
968+
It consists of a base cube at the co-ordinates of the node (the seabed /
969+
lakebed / riverbed node) plus a 'plantlike' extension above with a height
970+
defined by param2 (maximum height 16 nodes). This extension visually passes
971+
through any nodes above the base cube without affecting them.
972+
The node is dug by digging the base cube.
973+
The base cube texture tiles are defined as normal, the plantlike extension
974+
uses the defined 'special tile', for example:
975+
`special_tiles = {{name = "default_papyrus.png", tileable_vertical = true}},`
965976

966977
Noise Parameters
967978
----------------

0 commit comments

Comments
 (0)
Please sign in to comment.