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

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?

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

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.

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. 

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

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)