Started by
CluckNugget
on
Topic category: Help with Minecraft modding (Java Edition)
I've made a trading NPC where you can get 30-64 eggs every diamond you give to it through a GUI, but you can easily and even accidentally steal the amount of eggs the NPC offers by exiting out of the GUI while your diamonds are still in it and the eggs are in the output slot, resulting in you getting both back with no loss. The procedure that removes your diamonds relies on the "when item taken from slot" event, which does not trigger when you exit the GUI. How could I modify the GUI to disallow the eggs being taken via a GUI exit?
is the npc a living entity?
yes
Actually, Sometimes it isn't but for one case it is.
Make it so you have to click a button or something, and then it will take the appropriate amount of diamonds, and put a certain amount of eggs in the output slot. I can give an example procedure
heres the link, for examples: https://imgur.com/gallery/HQMhjZm
tysm!! this helped me so much. Have a great day :D