How to convert eaten item to another item and trigger an event after the item has been eaten.

Started by shigeon on

Topic category: User side tutorials

Last seen on 19:03, 28. Sep 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to convert eaten item to another item and trigger an event after the item has been eaten.

So in my mod I have a jar of milk, and an empty jar. I want to make it so that when you drink the jar of milk, it makes the jar empty and triggers a thunderstorm, generates lightning around the player, trigger a sound, and makes the weather go back to normal. How do I go about doing this?

Last seen on 13:18, 15. Feb 2023
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use procedures, You can add…
Sun, 09/27/2020 - 17:11

Use procedures, You can add blocks of code in a procedure mod element and then link the procedure to the item on the last edit page of the item wanted to cause an event, link it to "when eaten" box and done

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a bug though, that…
Mon, 09/28/2020 - 19:25

There is a bug though, that if you're food item is in the first slot when you eat it, the replacement item will not be given. If you figure out a workaround before I do, that'd be neat. Otherwise I'll post here if I can figure it out.

Last seen on 01:09, 29. Aug 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Instead of the office gem…
Fri, 10/16/2020 - 01:24

Instead of the office gem procedure block, try using an execute command block that uses a give command for the item. 

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh ya, good idea, I forgot…
Thu, 10/29/2020 - 05:41

Oh ya, good idea, I forgot about the give command

Last seen on 01:09, 29. Aug 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In Mcreator 2020.5, you will…
Thu, 10/29/2020 - 13:14

In Mcreator 2020.5, you will be able to have it give you an item in replacement without procedures (I think)