You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on_use etc. Include a note that prevents people from making the common mistake of trying to modify the inventory before/instead of returning the itemstack they want to be set.
The text was updated successfully, but these errors were encountered:
The confusion here is likely to stem from the fact that ItemStack is a mutable reference type, yet all functions & callbacks using ItemStacks pass them "by value", copying them (constrast this with e.g. vectors which are mutable but only provide methods that return copies, thus making it apparent that you have to feed the vector back in using some setter). I wonder whether such a note would suit the ItemStack doc well?
on_use
etc. Include a note that prevents people from making the common mistake of trying to modify the inventory before/instead of returning the itemstack they want to be set.The text was updated successfully, but these errors were encountered: