Started by
shigeon
on
Topic category: User side tutorials
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?
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
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.
Instead of the office gem procedure block, try using an execute command block that uses a give command for the item.
Oh ya, good idea, I forgot about the give command
In Mcreator 2020.5, you will be able to have it give you an item in replacement without procedures (I think)