Started by
Nanocry
on
Topic category: Help with MCreator software
Im just wondering, because i have and advancement that I want to trigger if the player has eaten one of the many foods in my mod. Can someone help with this?
EDIT: I know there is a procedure block in the advancement editor, but I cant find one in the procedure editor, and I need more than one condition like (pseudocode)
if <item>, or <item>.... consumed: trigger the advancement: '<namehere>'
idk how to code in java, or even code in java for Minecraft none the less, but i would really apreciate some help on this!
Edited by Nanocry on Tue, 03/03/2020 - 20:26
May have found a way around this via global variables, but I just wondered if there was a way to do this without trying to be clever like that? QOF stuff ya know?
I know i am MANY months late to ask this but is there a possibility you could help me? i have some idea about setting the global variable to a consumable item but i have no idea on how to make it affect you when eaten.
I had a bit of troubles with this, but I made a procedure that activates when the player finishes using an item.
If Provided Itemstack = {Food Item}
Set {Player Persistent Global Number Variable} to {Whatever number you want that isn't zero}
and then a procedure that activates every tick for the player
If {Player Persistent Global Number Variable} = {Desired Number}
Set {Player Persistent Global Number Variable} to 0
Apply potion effects