mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Allow overriding tool capabilities through itemstack metadata
This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
This commit is contained in:
parent
610ea6f216
commit
a637107a4e
10 changed files with 206 additions and 14 deletions
|
@ -3366,6 +3366,9 @@ Can be obtained via `item:get_meta()`.
|
|||
|
||||
#### Methods
|
||||
* All methods in MetaDataRef
|
||||
* `set_tool_capabilities([tool_capabilities])`
|
||||
* overrides the item's tool capabilities
|
||||
* a nil value will clear the override data and restore the original behavior
|
||||
|
||||
### `StorageRef`
|
||||
Mod metadata: per mod metadata, saved automatically.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue