Started by
ivanwafles67
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I have a procedure that is supposed to go through if a certain global variable is set to "taiga". I verified that the variable can in fact be changed to that, by having a "print" block. However, this if statement isn't returning true and so the inside blocks aren't being considered. I know the variable armyteam is in fact "taiga", but the if statement isn't passing as true. I've had this problem with other global text variables. How could I fix this?
Edited by ivanwafles67 on Mon, 05/03/2021 - 00:22
Are you using a player variable?
It's a global PLAYER_PERSISTENT variable, so it should be referencing the player involved in the procedure, I think.
Or does it only work if the Event/Target Entity is the player? Because in the screenshot, the player is the Source Entity.
only if the event entity is the player
I will give you a solution
I don't know if it is the best but it works
On player tick update set nbt (armyteam) to global (armyteam)
And to the procedure of your picture
you would check if "source entity" has the ntb taiga
sorry for my English