mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add get_wielded_item
This commit is contained in:
@@ -721,6 +721,7 @@ Call these functions only at load time!
|
||||
* `minetest.after(time, func, ...)`
|
||||
* Call the function `func` after `time` seconds, may be fractional
|
||||
* Optional: Variable number of arguments that are passed to `func`
|
||||
|
||||
### Map
|
||||
* `minetest.get_node(pos)`
|
||||
* Returns the node at the given position as table in the format
|
||||
@@ -728,6 +729,11 @@ Call these functions only at load time!
|
||||
for unloaded areas.
|
||||
* `minetest.get_node_or_nil(pos)`
|
||||
* Same as `get_node` but returns `nil` for unloaded areas.
|
||||
|
||||
### Player
|
||||
* `minetest.get_wielded_item()`
|
||||
* Returns the itemstack the local player is holding
|
||||
|
||||
### Misc.
|
||||
* `minetest.parse_json(string[, nullvalue])`: returns something
|
||||
* Convert a string containing JSON data into the Lua equivalent
|
||||
|
Reference in New Issue
Block a user