The rating is the percentage of damage caused by items with this damage group.
See [Entity damage mechanism].
- object.get_armor_groups() --> a group-rating table (e.g. {fleshy=100})
- object.set_armor_groups({fleshy=30, cracky=80})
+ object:get_armor_groups() --> a group-rating table (e.g. {fleshy=100})
+ object:set_armor_groups({fleshy=30, cracky=80})
Groups of tool capabilities
---------------------------
`minetest.get_mapgen_object`.
* (`p1`, `p2`) is the area in which lighting is set, defaults to the whole
area if left out.
-* `get_light_data()`: Gets the light data read into the `VoxelManip` object
+* `get_light_data([buffer])`: Gets the light data read into the
+ `VoxelManip` object
* Returns an array (indices 1 to volume) of integers ranging from `0` to
`255`.
* Each value is the bitwise combination of day and night light values
(`0` to `15` each).
* `light = day + (night * 16)`
+ * If the param `buffer` is present, this table will be used to store the
+ result instead.
* `set_light_data(light_data)`: Sets the `param1` (light) contents of each node
in the `VoxelManip`.
* expects lighting data in the same format that `get_light_data()` returns
Privileges provide a means for server administrators to give certain players
access to special abilities in the engine, games or mods.
-For example, game moderators may need to travel instantly to any place in the world,
+For example, game moderators may need to travel instantly to any place in the world,
this ability is implemented in `/teleport` command which requires `teleport` privilege.
Registering privileges
----------------------
-A mod can register a custom privilege using `minetest.register_privilege` function
+A mod can register a custom privilege using `minetest.register_privilege` function
to give server administrators fine-grained access control over mod functionality.
For consistency and practical reasons, privileges should strictly increase the abilities of the user.
Checking privileges
-------------------
-A mod can call `minetest.check_player_privs` to test whether a player has privileges
+A mod can call `minetest.check_player_privs` to test whether a player has privileges
to perform an operation.
Also, when registering a chat command with `minetest.register_chatcommand` a mod can
declare privileges that the command requires using the `privs` field of the command
* `default_privs`: defines privileges granted to new players.
* `basic_privs`: defines privileges that can be granted/revoked by players having
- the `basic_privs` privilege. This can be used, for example, to give
+ the `basic_privs` privilege. This can be used, for example, to give
limited moderation powers to selected users.
'minetest' namespace reference
particlespawner_tweenable = true,
-- allows get_sky to return a table instead of separate values (5.6.0)
get_sky_as_table = true,
+ -- VoxelManip:get_light_data accepts an optional buffer argument (5.7.0)
+ get_light_data_buffer = true,
}
* `minetest.has_feature(arg)`: returns `boolean, missing_features`
* `string`: Simple version, eg, "1.2.3-dev"
* `hash`: Full git version (only set if available),
eg, "1.2.3-dev-01234567-dirty".
+ * `is_dev`: Boolean value indicating whether it's a development build
Use this for informational purposes only. The information in the returned
table does not represent the capabilities of the engine, nor is it
reliable or verifiable. Compatible forks will have a different name and
(default: `true`)
* `texture`: A regular texture for the sun. Setting to `""`
will re-enable the mesh sun. (default: "sun.png", if it exists)
+ The texture appears non-rotated at sunrise and rotated 180 degrees
+ (upside down) at sunset.
* `tonemap`: A 512x1 texture containing the tonemap for the sun
(default: `"sun_tonemap.png"`)
* `sunrise`: A regular texture for the sunrise texture.
* `sunrise_visible`: Boolean for whether the sunrise texture is visible.
(default: `true`)
* `scale`: Float controlling the overall size of the sun. (default: `1`)
+ Note: For legacy reasons, the sun is bigger than the moon by a factor
+ of about `1.57` for equal `scale` values.
* `get_sun()`: returns a table with the current sun parameters as in
`set_sun`.
* `set_moon(moon_parameters)`:
(default: `true`)
* `texture`: A regular texture for the moon. Setting to `""`
will re-enable the mesh moon. (default: `"moon.png"`, if it exists)
- Note: Relative to the sun, the moon texture is rotated by 180°.
+ The texture appears non-rotated at sunrise / moonset and rotated 180
+ degrees (upside down) at sunset / moonrise.
+ Note: Relative to the sun, the moon texture is hence rotated by 180°.
You can use the `^[transformR180` texture modifier to achieve the same orientation.
* `tonemap`: A 512x1 texture containing the tonemap for the moon
(default: `"moon_tonemap.png"`)
* `scale`: Float controlling the overall size of the moon (default: `1`)
+ Note: For legacy reasons, the sun is bigger than the moon by a factor
+ of about `1.57` for equal `scale` values.
* `get_moon()`: returns a table with the current moon parameters as in
`set_moon`.
* `set_stars(star_parameters)`: