Started by
ButterKing-28
on
Topic category: Help with modding (Java Edition)
Hello!
I am trying to make an item that does not have a decrement when it is eaten and stays in your inventory (so it does not have any decrement). I tried to make a custom item, and it doesn't let you eat it because I think the way I did it just makes it un-edible because It sets the decrement to 0 when it is right-clicked.
Can someone help me figure out how to do it?
Thank you so much!
ButterKing-28
I'm not sure to understand correctly : You want that for example if you have 64 food in you hand and you eat one, you have still 64 at the end ?
In this case, can't you create a procedure that say something like "when food is eaten, add 1 food to player inventory" ?
To avoid problems like your food appear in an other slot, you can create a variable that register the number of items in the main hand when start eating, and when eaten, set the items of the main hand to the variable.