@@ -79,12 +79,15 @@ <h2 id="table-of-contents">Table of Contents</h2>
79
79
< li > < a href ="#ore-types "> Ore types</ a > < ul >
80
80
< li > < a href ="#scatter "> scatter</ a > </ li >
81
81
< li > < a href ="#sheet "> sheet</ a > </ li >
82
+ < li > < a href ="#puff "> puff</ a > </ li >
82
83
< li > < a href ="#blob "> blob</ a > </ li >
83
- < li > < a href ="#vein "> ` vein</ a > </ li >
84
+ < li > < a href ="#vein "> vein</ a > </ li >
84
85
</ ul >
85
86
</ li >
86
87
< li > < a href ="#ore-attributes "> Ore attributes</ a > < ul >
87
88
< li > < a href ="#absheight "> absheight</ a > </ li >
89
+ < li > < a href ="#puff_cliffs "> puff_cliffs</ a > </ li >
90
+ < li > < a href ="#puff_additive_composition "> puff_additive_composition</ a > </ li >
88
91
</ ul >
89
92
</ li >
90
93
< li > < a href ="#decoration-types "> Decoration types</ a > < ul >
@@ -228,7 +231,7 @@ <h2 id="table-of-contents">Table of Contents</h2>
228
231
< li > < a href ="#methods "> Methods</ a > </ li >
229
232
</ ul >
230
233
</ li >
231
- < li > < a href ="#notetimerref " > NoteTimerRef </ a > < ul >
234
+ < li > < a href ="#nodetimerref " > NodeTimerRef </ a > < ul >
232
235
< li > < a href ="#methods_1 "> Methods</ a > </ li >
233
236
</ ul >
234
237
</ li >
@@ -336,7 +339,7 @@ <h2 id="introduction">Introduction</h2>
336
339
< ul >
337
340
< li > More information at < a href ="http://www.minetest.net/ "> http://www.minetest.net/</ a > </ li >
338
341
< li > Developer Wiki: < a href ="http://dev.minetest.net/ "> http://dev.minetest.net/</ a > </ li >
339
- </ ul > This page was last updated 03 /September/2015.< br /> See < a href ="https://github.com/minetest/minetest/blob/master/doc/lua_api.txt "> doc/lua_api.txt</ a > for the latest version (in plaintext).< br /> Generated using < a href ="https://github.com/rubenwardy/minetest_modding_book/blob/gh-pages/update_lua_api.py "> a Python script</ a > .< h2 id ="programming-in-lua "> Programming in Lua</ h2 >
342
+ </ ul > This page was last updated 25 /September/2015.< br /> See < a href ="https://github.com/minetest/minetest/blob/master/doc/lua_api.txt "> doc/lua_api.txt</ a > for the latest version (in plaintext).< br /> Generated using < a href ="https://github.com/rubenwardy/minetest_modding_book/blob/gh-pages/update_lua_api.py "> a Python script</ a > .< h2 id ="programming-in-lua "> Programming in Lua</ h2 >
340
343
< p > If you have any difficulty in understanding this, please read
341
344
< a href ="http://www.lua.org/pil/ "> Programming in Lua</ a > .</ p >
342
345
< h2 id ="startup "> Startup</ h2 >
@@ -942,20 +945,31 @@ <h3 id="scatter"><code>scatter</code></h3>
942
945
a non-equal distribution of ore.</ p >
943
946
< h3 id ="sheet "> < code > sheet</ code > </ h3 >
944
947
< p > Creates a sheet of ore in a blob shape according to the 2D perlin noise
945
- described by < code > noise_params</ code > . The relative height of the sheet can be
946
- controlled by the same perlin noise as well, by specifying a non-zero
947
- < code > scale</ code > parameter in < code > noise_params</ code > .</ p >
948
- < p > < strong > IMPORTANT</ strong > : The noise is not transformed by < code > offset</ code > or < code > scale</ code > when comparing
949
- against the noise threshold, but scale is used to determine relative height.
950
- The height of the blob is randomly scattered, with a maximum height of < code > clust_size</ code > .</ p >
951
- < p > < code > clust_scarcity</ code > and < code > clust_num_ores</ code > are ignored.</ p >
952
- < p > This is essentially an improved version of the so-called "stratus" ore seen in
953
- some unofficial mods.</ p >
948
+ described by < code > noise_params</ code > and < code > noise_threshold</ code > . This is essentially an
949
+ improved version of the so-called "stratus" ore seen in some unofficial mods.</ p >
950
+ < p > This sheet consists of vertical columns of uniform randomly distributed height,
951
+ varying between the inclusive range < code > column_height_min</ code > and < code > column_height_max</ code > .
952
+ If < code > column_height_min</ code > is not specified, this parameter defaults to 1.
953
+ If < code > column_height_max</ code > is not specified, this parameter defaults to < code > clust_size</ code >
954
+ for reverse compatibility. New code should prefer < code > column_height_max</ code > .</ p >
955
+ < p > The < code > column_midpoint_factor</ code > parameter controls the position of the column at which
956
+ ore eminates from. If 1, columns grow upward. If 0, columns grow downward. If 0.5,
957
+ columns grow equally starting from each direction. < code > column_midpoint_factor</ code > is a
958
+ decimal number ranging in value from 0 to 1. If this parameter is not specified,
959
+ the default is 0.5.</ p >
960
+ < p > The ore parameters < code > clust_scarcity</ code > and < code > clust_num_ores</ code > are ignored for this ore type.</ p >
961
+ < h3 id ="puff "> < code > puff</ code > </ h3 >
962
+ < p > Creates a sheet of ore in a cloud-like puff shape.</ p >
963
+ < p > As with the < code > sheet</ code > ore type, the size and shape of puffs are described by
964
+ < code > noise_params</ code > and < code > noise_threshold</ code > and are placed at random vertical positions
965
+ within the currently generated chunk.</ p >
966
+ < p > The vertical top and bottom displacement of each puff are determined by the noise
967
+ parameters < code > np_puff_top</ code > and < code > np_puff_bottom</ code > , respectively.</ p >
954
968
< h3 id ="blob "> < code > blob</ code > </ h3 >
955
969
< p > Creates a deformed sphere of ore according to 3d perlin noise described by
956
970
< code > noise_params</ code > . The maximum size of the blob is < code > clust_size</ code > , and
957
971
< code > clust_scarcity</ code > has the same meaning as with the < code > scatter</ code > type.</ p >
958
- < h3 id ="vein "> ` vein</ h3 >
972
+ < h3 id ="vein "> < code > vein</ code > </ h3 >
959
973
< p > Creates veins of ore varying in density by according to the intersection of two
960
974
instances of 3d perlin noise with diffferent seeds, both described by
961
975
< code > noise_params</ code > . < code > random_factor</ code > varies the influence random chance has on
@@ -983,6 +997,15 @@ <h2 id="ore-attributes">Ore attributes</h2>
983
997
< h3 id ="absheight "> < code > absheight</ code > </ h3 >
984
998
< p > Also produce this same ore between the height range of < code > -y_max</ code > and < code > -y_min</ code > .</ p >
985
999
< p > Useful for having ore in sky realms without having to duplicate ore entries.</ p >
1000
+ < h3 id ="puff_cliffs "> < code > puff_cliffs</ code > </ h3 >
1001
+ < p > If set, puff ore generation will not taper down large differences in displacement
1002
+ when approaching the edge of a puff. This flag has no effect for ore types other
1003
+ than < code > puff</ code > .</ p >
1004
+ < h3 id ="puff_additive_composition "> < code > puff_additive_composition</ code > </ h3 >
1005
+ < p > By default, when noise described by < code > np_puff_top</ code > or < code > np_puff_bottom</ code > results in a
1006
+ negative displacement, the sub-column at that point is not generated. With this
1007
+ attribute set, puff ore generation will instead generate the absolute difference in
1008
+ noise displacement values. This flag has no effect for ore types other than < code > puff</ code > .</ p >
986
1009
< h2 id ="decoration-types "> Decoration types</ h2 >
987
1010
< p > The varying types of decorations that can be placed.</ p >
988
1011
< p > The default value is < code > simple</ code > , and is currently the only type supported.</ p >
@@ -1900,6 +1923,10 @@ <h2 id="helper-functions">Helper functions</h2>
1900
1923
< li > Same but in reverse. Returns < code > nil</ code > if the string can't be parsed to a position.</ li >
1901
1924
</ ul >
1902
1925
</ li >
1926
+ < li > < code > minetest.string_to_area("(X1, Y1, Z1) (X2, Y2, Z2)")</ code > : returns two positions< ul >
1927
+ < li > Converts a string representing an area box into two positions</ li >
1928
+ </ ul >
1929
+ </ li >
1903
1930
< li > < code > minetest.formspec_escape(string)</ code > : returns a string< ul >
1904
1931
< li > escapes the characters "[", "]", "\", "," and ";", which can not be used in formspecs</ li >
1905
1932
</ ul >
@@ -2235,15 +2262,16 @@ <h3 id="environment-access">Environment access</h3>
2235
2262
< li > Returns < code > nil</ code > for unloaded area</ li >
2236
2263
</ ul >
2237
2264
</ li >
2238
- < li >
2239
- < p > < code > minetest.get_node_light(pos, timeofday)</ code > returns a number between < code > 0</ code > and < code > 15</ code > or < code > nil</ code > </ p >
2240
- < ul >
2265
+ < li > < code > minetest.get_node_light(pos, timeofday)</ code > < ul >
2266
+ < li > Gets the light value at the given position. Note that the light value
2267
+ "inside" the node at the given position is returned, so you usually want
2268
+ to get the light value of a neighbor.</ li >
2269
+ < li > < code > pos</ code > : The position where to measure the light.</ li >
2241
2270
< li > < code > timeofday</ code > : < code > nil</ code > for current time, < code > 0</ code > for night, < code > 0.5</ code > for day</ li >
2271
+ < li > Returns a number between < code > 0</ code > and < code > 15</ code > or < code > nil</ code > </ li >
2242
2272
</ ul >
2243
2273
</ li >
2244
- < li >
2245
- < p > < code > minetest.place_node(pos, node)</ code > </ p >
2246
- < ul >
2274
+ < li > < code > minetest.place_node(pos, node)</ code > < ul >
2247
2275
< li > Place node with the same effects that a player would cause</ li >
2248
2276
</ ul >
2249
2277
</ li >
@@ -2365,6 +2393,11 @@ <h3 id="environment-access">Environment access</h3>
2365
2393
< li > clear all objects in the environments</ li >
2366
2394
</ ul >
2367
2395
</ li >
2396
+ < li > < code > minetest.emerge_area(pos1, pos2)</ code > < ul >
2397
+ < li > queues all mapblocks in the area from pos1 to pos2, inclusive, for emerge</ li >
2398
+ < li > i.e. asynchronously loads blocks from disk, or if inexistent, generates them</ li >
2399
+ </ ul >
2400
+ </ li >
2368
2401
< li > < code > minetest.delete_area(pos1, pos2)</ code > < ul >
2369
2402
< li > delete all mapblocks in the area from pos1 to pos2, inclusive</ li >
2370
2403
</ ul >
@@ -2972,7 +3005,7 @@ <h4 id="methods">Methods</h4>
2972
3005
</ ul >
2973
3006
</ li >
2974
3007
</ ul >
2975
- < h3 id ="notetimerref "> < code > NoteTimerRef </ code > </ h3 >
3008
+ < h3 id ="nodetimerref "> < code > NodeTimerRef </ code > </ h3 >
2976
3009
< p > Node Timers: a high resolution persistent per-node timer.
2977
3010
Can be gotten via < code > minetest.get_node_timer(pos)</ code > .</ p >
2978
3011
< h4 id ="methods_1 "> Methods</ h4 >
0 commit comments