Topic category: Help with modding (Java Edition)
Haldo! Just starting out making some test items with potion effects/sounds/achievements, simple stuff. Everything's been going great, until I tried making the items single-use. Then things got confusing.
I thought giving the item durability:1 and adding a Damage Item event of 1 to the right-click would do it, but every time I add the Damage Item event it just throws an exception.
So then I started looking into the difference between Max Item Usage Duration and Item Damage Count, and ... I honestly can't find any documentation that describes what that first one does. Seriously, the wiki has the same description word-for-word across those two entries. I tried giving the item 1 of either or both, but it always had infinite uses in-game. No other forum poster seems to have had this specific question/problem that I can find, hence this new topic.
TL;DR: How do I make a single-use item that gets destroyed when you right-click with it, and what does Max Item Usage Duration mean? And why does the Damage Item event break the mod? Thanks!