GUI: Check for item in the inventory, then remove it and replace with another one

Started by Luigi999999 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
GUI: Check for item in the inventory, then remove it and replace with another one

I made a gui linked to an item that if you click a button (the GUI button), it checks for the item you have to pay, and then gives you diamonds in exchange for that item but when I click it , it gives me diamonds but then they disappear and it gives me back the first item (the item I have to pay, in this case the golden coin).

This is the procedure linked to the GUI button: https://imgur.com/gallery/o92HFJG

Thank you in advance!

Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks a lot for the answer…
Sat, 12/29/2018 - 15:59

Thanks a lot for the answer. But why does not my procedure work? Did I do something wrong?

Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Which is the Event Trigger?…
Sat, 12/29/2018 - 18:50

Which is the Event Trigger?

Sometimes, if you edit a lot one Procedure, it doesn't work anymore. Try to delete the procedure and create it again.

If you edit the procedure,…
Sun, 12/30/2018 - 07:58

If you edit the procedure, you might need to open the element that is triggering the procedure and simply save it again so the dependencies get refreshed.