From a9c0961e0c9c3b854aca34b6d582198be1cd2277 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sat, 28 Sep 2013 22:47:09 +0200 Subject: Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStack --- doc/lua_api.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 06230eaa7..335f8af65 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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) -- cgit v1.2.3