mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add Lua API function to resolve node/collision/selection boxes (#13964)
This commit is contained in:
parent
4859cf44ce
commit
f2b99332d9
13 changed files with 159 additions and 28 deletions
|
@ -6183,6 +6183,17 @@ Environment access
|
|||
* increase level of leveled node by level, default `level` equals `1`
|
||||
* if `totallevel > maxlevel`, returns rest (`total-max`)
|
||||
* `level` must be between -127 and 127
|
||||
* `minetest.get_node_boxes(box_type, pos, [node])`
|
||||
* `box_type` must be `"node_box"`, `"collision_box"` or `"selection_box"`.
|
||||
* `pos` must be a node position.
|
||||
* `node` can be a table in the form `{name=string, param1=number, param2=number}`.
|
||||
If `node` is `nil`, the actual node at `pos` is used instead.
|
||||
* Resolves any facedir-rotated boxes, connected boxes and the like into
|
||||
actual boxes.
|
||||
* Returns a list of boxes in the form
|
||||
`{{x1, y1, z1, x2, y2, z2}, {x1, y1, z1, x2, y2, z2}, ...}`. Coordinates
|
||||
are relative to `pos`.
|
||||
* See also: [Node boxes](#node-boxes)
|
||||
* `minetest.fix_light(pos1, pos2)`: returns `true`/`false`
|
||||
* resets the light in a cuboid-shaped part of
|
||||
the map and removes lighting bugs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue