Currently InvRef:contains_item() returns true if the item was found, and false otherwise. I suggest that this be augmented, so that it returns the index of the item (or 0 if it was not found).
Alternatively, to preserve backwards compatibility, there could be an InvRef:find_item() function.
This is useful when modifying item stacks that have wear and other data associated with them. For example, detecting if an item stack exists and has full durability.
InvRef:contains_item() Indices
InvRef:contains_item() Indices
WorldEdit 1.0 released
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
Re: InvRef:contains_item() Indices
So, this would be a great idea. Are we going to see any discussion on this?
Re: InvRef:contains_item() Indices
I thought the same in the past. Make a request in github.
Who is online
Users browsing this forum: No registered users and 4 guests