Started by
Sin Costan
on
Topic category: Help with Minecraft modding (Java Edition)
So I'm trying to make a system with some items I have, it's supposed to deactivate all the items with a certain tag if it finds more than one item that's considered "active". Everything works fine except the items are never deactivated, but the [print] tells me that they are all, in fact, inactive. I'd appreciate someone looking at this to see if there's some issue that i just haven't noticed yet? I can't find a single reason for why it doesn't work at the moment.
Image: https://imgur.com/a/JSblxMK
Thanks in advance!
All that I see is that you have the comparison of 1 is bigger than activeNum and you start activeNum at 0 and give it one. It could be because the 1 < activeNum (1). They equal each other.
I add one to activeNum for each "active" item found in the inventory. I already mentioned that everything works completely as intended, the ONLY part that ISN'T working is the block that's supposed to set the active tag to "false", therefore deactivating that item. The console prints that everything is set to false, but I have already confirmed that not to be the case (everything stays active=true).