Started by
Mido-shonun
on
Topic category: User side tutorials
I've seen things about how to make custom food do things after eating it, but could not find anything on normal Minecraft foods.
this is pretty important to my mod, since its Tokyo Ghoul. Unfortunately, I had to figure it out on my own.
it was pretty easy:
Make the event trigger "player finishes using item" (in a normal procedure)
Check what the "Provided Itemstack" is, and set it to whatever foods you want.
From there, make it do what you want.
the only issue is that you have to put each food in one by one. this is what's used in my Tokyo Ghoul mod
Edited by Mido-shonun on Sun, 09/29/2024 - 21:28
To solve the issue of putting in foods one by one, you can create an item element tag with namespace (ex:
"namespace"
) and name (ex:"tag_name"
) and then useIs Provided Itemstack tagged in item tags as 'namespace:tag_name'
For all foods, you can even use
Get food value of Provided Item Stack
and check if it is positive. (For some reason, this will trigger ominous bottles)Unfortunately, neither of these methods work with cake.
Correction: you will still have to put the foods into the item tag one by one, but it will be significantly less tedious than doing it in a procedure.