Started by
snoweyrawr
on
Topic category: Help with Minecraft modding (Java Edition)
Hello,
I'm programming an economy mod and building the shop up now and I've designed the GUI and setup item for sale and how much said item costs however I now need the shop inventory, 9 slots which cover the shops stock. I did try add each slot amount however this creates a problem of cheating. I need it to set the correct amount of blocks available each time its adjusted by the player. How would I go about this?
you can make an text box in the gui and in your on gui open trigger put a procedure to update the amount based on the number the player types in the box and use a varaible to store the values even if the gui is closed.
Follow up if you need further help.
I forgot to answer the part about the 9 slots so, use "get number of items from slot [number] of current open gui" and just cycle through it 9 times adjusting a var to count each time to check the slots content amount.