mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 10:25:21 +02:00
Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStack
This commit is contained in:
@@ -1658,9 +1658,13 @@ ItemStack: A stack of items.
|
||||
methods:
|
||||
- is_empty(): return true if stack is empty
|
||||
- get_name(): returns item name (e.g. "default:stone")
|
||||
- set_name(itemname)
|
||||
- get_count(): returns number of items on the stack
|
||||
- set_count(count)
|
||||
- get_wear(): returns tool wear (0-65535), 0 for non-tools
|
||||
- set_wear(wear)
|
||||
- get_metadata(): returns metadata (a string attached to an item stack)
|
||||
- set_metadata(metadata)
|
||||
- clear(): removes all items from the stack, making it empty
|
||||
- replace(item): replace the contents of this stack (item can also
|
||||
be an itemstring or table)
|
||||
|
Reference in New Issue
Block a user