diff options
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 1bfe0a0c2..557fdccb1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2152,13 +2152,16 @@ 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) +- set_name(itemname): returns true/false (success) + ^ clears item on failure - get_count(): returns number of items on the stack -- set_count(count) +- set_count(count): returns true/false (success) + ^ clears item on failure - get_wear(): returns tool wear (0-65535), 0 for non-tools -- set_wear(wear) +- set_wear(wear): returns true/false (success) + ^ clears item on failure - get_metadata(): returns metadata (a string attached to an item stack) -- set_metadata(metadata) +- set_metadata(metadata): returns true - 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) |