Skip to content
Snippets Groups Projects
Commit 9a3129da authored by sfan5's avatar sfan5
Browse files

Make documentation about ItemStack:set_{name,count,wear} clearer

	These methods do not actually fail but instead clear the item stack
	and return false if a value like e.g. "" is passed.
parent a468acce
No related branches found
No related tags found
No related merge requests found
......@@ -2966,13 +2966,11 @@ an itemstring, a table or `nil`.
#### Methods
* `is_empty()`: Returns `true` if stack is empty.
* `get_name()`: Returns item name (e.g. `"default:stone"`).
* `set_name(item_name)`: Returns boolean success.
Clears item on failure.
* `set_name(item_name)`: Returns boolean whether item was cleared
* `get_count()`: Returns number of items on the stack.
* `set_count(count)`
* `set_count(count)`: Returns boolean whether item was cleared
* `get_wear()`: Returns tool wear (`0`-`65535`), `0` for non-tools.
* `set_wear(wear)`: Returns boolean success.
Clears item on failure.
* `set_wear(wear)`: Returns boolean whether item was cleared
* `get_metadata()`: Returns metadata (a string attached to an item stack).
* `set_metadata(metadata)`: Returns true.
* `clear()`: removes all items from the stack, making it empty.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment