Started by
StellaeLux
on
Topic category: Help with MCreator software
I created 2 special armor sets. I simply want them to have a certain LOGIC NBT tag. When (an individual piece of) armor is equipped the NBT tag(of that specific piece) becomes true. When it is unequipped, it becomes false.
Currently there is no "on armor equipped" or "on armor removed" procedure call. There's only on (armor piece) update tick.
So setting the NBT tag to true is easy, though it hurts me on a spiritual level that it sets it to true 20 times per second, but setting it to false after when just unequipped is the harder part.
Does anyone have a clue on how to achieve this?
(EDIT: I added the procedure calls on the list https://mcreator.net/forum/53314/list-things-192)
Edited by StellaeLux on Fri, 09/27/2019 - 13:43
APPROACH 1:
for every armour piece (in this example the helmet):
But this seems so so so inefficient. 20 ticks when wearing 1 of those armor pieces: 80 when wearing a whole set and 4 versions of the OnPlayerUpdate either always incrementing or setting a value to false every tick as well!
If you guys know something better please let me know.
You could do an if statement to check if it's already set to true before setting it to true.
But this adds to the computational logic that it would have to do.
Getting the value and comparing it or simply setting the value. I don't know which one is more taxing. I really hope we gan an on armor equipped/on armor removed procedure call, just like the ones input slots in gui have.
for the "Do Set Entity Number NBT tag "OnHelmetEquippedCounter" to Get Entity Number NBT tag "OnHelmetEquippedCounter" + 1." how do you add the +1
Inside the "Math" tab there's the "... + ..." and the "0" which you can set to 1.
yeah i got it now, i was confused on how to group it all up so you could put it in the DO procedure thing lol. Thanks!