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

Started by Luigi999999 on Thu, 12/27/2018 - 20:22

Topic category: Help with modding (Java Edition)

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
GUI: Check for item in the inventory, then remove it and replace with another one
Thu, 12/27/2018 - 20:22

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!

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?

Last seen on 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 19:38, 26. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
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.