Topic category: Help with Minecraft modding (Java Edition)
I FIXED THE PROBLEM. I accidentally used the wrong armor in the procedure and didn't notice. Oops.
(Mcreator should really show us the item texture when selecting armors instead of the blank white one)
I'm working on a dimension mod and I'm trying to make an armor set that will give you increasing amounts of speed while in the dimension. Here's the procedure set up.
The way it's supposed to work, is it sets a local variable, SetEquipped, to 0 initially. Afterwards, it checks whether or not you're in the right dimension. If you are, then it checks to see what armor pieces you have equipped. The variable goes up 1 for each piece. Once it's done calculating, it will give the player speed with a modifier equal to the SetEquipped variable. However, when I load the game, put on the full set, and enter the dimension, I only get speed 1 despite the fact that I had all the pieces equipped. This procedure is in the tick event for all of the armor pieces.
Does the order mean nothing in MCreator or did I do something wrong?
The procedure is in the tick event of the armor, so I won't unless I have armor on. When set to as the player update tick it will but I can add a condition on it so it doesn't once I get this working properly.
Did you not read the post at all? "This procedure is in the tick event for all of the armor pieces." I literally said this right near the end.
It might be causing an issue but I doubt it. When I remove the procedures from the armor and make on player tick instead, the same issue arises.
I copied your procedure and ran it in each of my armor ticks and it worked perfectly. Is something else in your mod messing it up?
I don't know what you guys are talking about but the fastest way to solve your problem is to take off your procedure from your armor triggers and to only trigger it on player tick. Do what you want but this is the only fastest way, I don't even know how do make this kind of procedure with armor events
@Max094_Reikeb I just tested the procedure in the armor tick and it worked fine.
In addition, I realize now that keeping the procedure in the armor tick MAY (though not necessarily) be more efficient in some regards than putting it in the player tick, because if it's in the player tick it has to keep checking even when the armor isn't being worn (so running 4x as often when the full set is worn may not run the procedure as often as running it EVERY tick the mod is installed).
I mean no offense in the slightest, but in the future I would recommend not stating that one way is better if you don't know how to do the other way:
Nothing else in my mod that does anything like this. Nothing that uses any sort of variable called SetEquipped or anything to do with checking for armor. I'll delete and remake the procedure and see if that works and if MCreator was just being dumb for a bit.
I found the issue. I put the wrong armor in the tick event and didn't realize it until now. Thank you to everyone who tried to help!
You're welcome, glad you found the problem!