Help with custom trading GUI

Started by Herios on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with custom trading GUI

I need to make a simple custom trading gui, but I can't seem to make it work. I want to make it so that it works like villager trades, where you don't have to click an extra button to make the trade, instead you simply grab the item if you can buy it. What I'm trying to make is:

  • When the player puts Item A in the slot 0, Item B is set in the slot 1 with the same amount of items as Item A in slot 0.
  • When the player takes the Item B from slot 1, it shrinks the Item A in slot 0 by one.
  • When the player takes the Item A in slot 0, it clears the Item B in slot 1.