I need to put custom data on an itemstack or Inventory (either works).
My problem is that i have read over the documentation and scoured the forums, but i am unable to find anything that tells me how to do this. Maybe i am missing something.
So if it is not too much to ask, could someone be kind enough to give me a quick rundown or tutorial?
If it helps. I am making a inventory menu with pagination, I just need to know the current page so that the Next Page button knows what page is next
I’m not too familiar with the API or coding for MC in general, but what if you create two new items with some nbt info set to the current page the player is on, so what “page number” would be handled in your code, and when the player hits next/previous in your code, The code would just add one or remove one from the current counter. Of course if it’s the first page it couldn’t have a previous, and if it’s the last page it can’t have a next.
Even better, instead of dealing with NBT which I don’t think is supported (not sure), maybe you can change the damage value of the item you are using.