Player NBT Data not working in If statements

Started by Electroman on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Player NBT Data not working in If statements

I am making a totem mod where if you die with this totem it makes an area where you are buffed and enemies debuffed. I have everything else working but every time I try to use NBT data to specify if the player is the "dominant" player it just doesnt work. Furthermore the entities around me get none of the effects while I(the target/event entity) receive all of them. Here is my code: https://imgur.com/a/CPuEt1s

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dude, what are you doing?…
Sun, 02/09/2025 - 11:43

Dude, what are you doing?

Why are you using text variables for logic?

There are logic tags..

Please report back on what happens after the change.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also I highly suggest…
Sun, 02/09/2025 - 11:44

Also I highly suggest setting the local variable to be a number tag, and get an if statement for when it ends to set the value to false.