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

Started by Luigi999999 on

Topic category: Help with modding (Java Edition)

Last seen on 08:14, 30. Dec 2018
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!

Last seen on 08:14, 30. Dec 2018
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?

Last seen on 18:46, 16. Oct 2021
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.