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

Started by shigeon on Sun, 09/27/2020 - 02:03

Topic category: User side tutorials

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to convert eaten item to another item and trigger an event after the item has been eaten.
Sun, 09/27/2020 - 02:03

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 19:29, 27. Sep 2020
Joined Oct 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 08:13, 29. Oct 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:07, 30. Oct 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 08:13, 29. Oct 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:07, 30. Oct 2020
Joined Mar 2020
User points:

User statistics:

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