From 7068641eb564af02e1b501f8c928cdc9f8168f74 Mon Sep 17 00:00:00 2001
From: rubenwardy
[mask:<file>
Apply a mask to the base image.
The mask is applied using binary AND.
-[colorize:<color>
[colorize:<color>:<ratio>
Colorize the textures with the given color.
-<color>
is specified as a ColorString
.
<color>
is specified as a ColorString
.
+<ratio>
is an int ranging from 0 to 255, and specifies how much of the
+color to apply. If ommitted, the alpha will be used.
Only Ogg Vorbis files are supported.
For positional playing of sounds, only single-channel (mono) files are
@@ -667,15 +669,29 @@ the global minetest.registered_*
tables.
minetest.register_ore(ore definition)
minetest.registered_ores
minetest.registered_ores
with the key of ore.name
ore.name
is nil, the key is the returned IDminetest.register_decoration(decoration definition)
minetest.registered_decorations
minetest.registered_decorations
with the key of decoration.name
decoration.name
is nil, the key is the returned IDminetest.clear_registered_ores()
clears all ores currently registered
+minetest.clear_registered_decorations()
Note that in some cases you will stumble upon things that are not contained in these tables (e.g. when a mod has been removed). Always check for @@ -717,8 +733,10 @@ store arbitrary values.
node definition:param1
is reserved for the engine when paramtype != "none"
:
paramtype = "light"
-^ The value stores light with and without sun in it's
- upper and lower 4 bits.
+^ The value stores light with and without sun in its upper and lower 4 bits
+ respectively. Allows light to propagate from or through the node with
+ light value falling by 1 per node. This is essential for a light source
+ node to spread its light.
param2
is reserved for the engine when any of these are used:
liquidtype == "flowing"
@@ -1452,7 +1470,8 @@ list[current_player;craftpreview;7,1;1,1;]
Position and size units are inventory slots
Example for formspec 8x4 in 16x resolution:
image shall be sized 8 times 16px times 4 times 16px
-If true
the background is clipped to formspec size (x
and y
are used as offset values, w
and h
are ignored)
+If true
the background is clipped to formspec size
+ (x
and y
are used as offset values, w
and h
are ignored)
pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>]
@@ -1882,12 +1901,18 @@ value must (always) be two hexadecimal digits.
minetest.register_craft(recipe)
minetest.register_ore(ore definition)
minetest.register_decoration(decoration definition)
-minetest.override_item(name, redefinition)
+-
+
minetest.override_item(name, redefinition)
+
- Overrides fields of an item registered with register_node/tool/craftitem.
- Note: Item must already be defined, (opt)depend on the mod defining it.
- Example:
minetest.override_item("default:mese", {light_source=LIGHT_MAX})
+-
+
minetest.clear_registered_ores()
+
+minetest.clear_registered_decorations()
Global callback registration functions
Call these functions only at load time!
@@ -2169,7 +2194,8 @@ and minetest.auth_reload
call the authetification handler.
- Function cannot be called after the registration period; only initialization and
on_mapgen_init
- Takes a table as an argument with the fields
mgname
, seed
, water_level
, and flags
.
- Leave field unset to leave that parameter unchanged
-flags
contains a comma-delimited string of flags to set, or if the prefix "no"
is attached, clears instead.
+flags
contains a comma-delimited string of flags to set,
+ or if the prefix "no"
is attached, clears instead.
flags
is in the same format and has the same options as mg_flags
in minetest.conf
@@ -2189,6 +2215,10 @@ and minetest.auth_reload
call the authetification handler.
- clear all objects in the environments
+minetest.delete_area(pos1, pos2)
+- delete all mapblocks in the area from pos1 to pos2, inclusive
+
+
minetest.line_of_sight(pos1, pos2, stepsize)
: returns boolean, pos
- Check if there is a direct line of sight between
pos1
and pos2
- Returns the position of the blocking node when
false
@@ -2308,7 +2338,8 @@ and minetest.auth_reload
call the authetification handler.
minetest.dir_to_facedir(dir, is6d)
- Convert a vector to a facedir value, used in
param2
for paramtype2="facedir"
;
-- passing something non-
nil
/false
for the optional second parameter causes it to take the y component into account
+- passing something non-
nil
/false
for the optional second parameter causes it to
+ take the y component into account
minetest.facedir_to_dir(facedir)
@@ -2374,7 +2405,8 @@ and minetest.auth_reload
call the authetification handler.
Rollback
-minetest.rollback_get_node_actions(pos, range, seconds, limit)
: returns { {actor, pos, time, oldnode, newnode}, ...}
+minetest.rollback_get_node_actions(pos, range, seconds, limit)
:
+ returns { {actor, pos, time, oldnode, newnode}, ...}
- Find who has done something to a node, or near a node
actor
: "player:<name>"
, also "liquid"
.
@@ -2502,8 +2534,8 @@ and minetest.auth_reload
call the authetification handler.
- If there are two or more entries with the same pos value, the last entry is used.
- If
pos
is not inside the box formed by p1
and p2
, it is ignored.
- If
probability_list
equals nil
, no probabilities are applied.
-- Slice probability works in the same manner, except takes a field called
ypos
instead which indicates
- the y position of the slice with a probability applied.
+- Slice probability works in the same manner, except takes a field called
ypos
instead which
+ indicates the y position of the slice with a probability applied.
- If slice probability list equals
nil
, no slice probabilities are applied.
@@ -2928,7 +2960,8 @@ Can be gotten via minetest.get_node_timer(pos)
.
nil
: Disables override, defaulting to sunlight based on day-night cycle
-set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, frame_speed=30)
: set animation for player model in third person view
+set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, frame_speed=30)
:
+ set animation for player model in third person view
- stand/idle animation key frames
- walk animation key frames
- dig animation key frames
@@ -3051,7 +3084,8 @@ for 2D noise, and it must be must be larger than 1 for 3D noise (otherwise
with values starting at pos={x=,y=}
get3dMap(pos)
: returns a <size.x>
times <size.y>
times <size.z>
3D array
of 3D noise with values starting at pos={x=,y=,z=}
-get2dMap_flat(pos)
: returns a flat <size.x * size.y>
element array of 2D noise with values starting at pos={x=,y=}
+get2dMap_flat(pos)
: returns a flat <size.x * size.y>
element array of 2D noise
+ with values starting at pos={x=,y=}
get3dMap_flat(pos)
: Same as get2dMap_flat
, but 3D noise
VoxelManip
@@ -3443,7 +3477,9 @@ minetest.spawn_tree(pos,apple_tree)
alpha = 255,
use_texture_alpha = false, -- Use texture's alpha channel
post_effect_color = {a=0, r=0, g=0, b=0}, -- If player is inside node
- paramtype = "none", -- See "Nodes"
+ paramtype = "none", -- See "Nodes" --[[
+ ^ paramtype = "light" allows light to propagate from or through the node with light value
+ ^ falling by 1 per node. This line is essential for a light source node to spread its light. ]]
paramtype2 = "none", -- See "Nodes"
is_ground_content = true, -- If false, the cave generator will not carve through this
sunlight_propagates = false, -- If true, sunlight will go infinitely through this
@@ -3457,15 +3493,17 @@ minetest.spawn_tree(pos,apple_tree)
liquid_alternative_source = "", -- Source version of flowing liquid
liquid_viscosity = 0, -- Higher viscosity = slower flow (max. 7)
liquid_renewable = true, -- Can new liquid source be created by placing two or more sources nearby?
- leveled = 0, -- Block contain level in param2. value - default level, used for snow. Don't forget use "leveled" type nodebox
+ leveled = 0, --[[
+ ^ Block contains level in param2. Value is default level, used for snow.
+ ^ Don't forget to use "leveled" type nodebox. ]]
liquid_range = 8, -- number of flowing nodes around source (max. 8)
drowning = 0, -- Player will take this amount of damage if no bubbles are left
light_source = 0, -- Amount of light emitted by node
damage_per_second = 0, -- If player is inside node, this damage is caused
node_box = {type="regular"}, -- See "Node boxes"
mesh = "model",
- selection_box = {type="regular"}, -- See "Node boxes"
- ^ If drawtype "nodebox" is used and selection_box is nil, then node_box is used
+ selection_box = {type="regular"}, -- See "Node boxes" --[[
+ ^ If drawtype "nodebox" is used and selection_box is nil, then node_box is used. ]]
legacy_facedir_simple = false, -- Support maps made in and before January 2012
legacy_wallmounted = false, -- Support maps made in and before January 2012
sounds = {