Weird item data behavior

Started by Sin Costan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Weird item data behavior

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!

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
All that I see is that you…
Thu, 11/07/2024 - 17:11

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.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I add one to activeNum for…
Fri, 11/08/2024 - 02:12

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).