Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-266301

Nbt commands for active effects not working correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.2
    • None
    • Windows 10
      Java (build 1.8.0_391-b13)
    • Unconfirmed

      I have minigames that check to see if a user with certain tags and effects using command blocks. Anything with the active effect will not work unless manually reversed and then reversed to the original way again. If the situation is reversed where you cant have the effect, and you get the effect, the command block doesn't shut off. Please help as all of my minigames rely on this to work and thus have stopped working because of this new bug. (yes it used to work perfectly fine as we play my minigames quite often) (No it doesn't seem to matter the type of effect either whether its strength or speed it'll do the same} The following is just a basic way i use the command to activate a redstone signal for other command blocks. I do play on realms but did test in a single player match and it did the same thing.

      What I expected to happen was...:
      this command should activate when the effect is on at least one player with those tags, and the effect!
      /execute if entity @a[tag=ZHS,tag=CoolDown,nbt={ActiveEffects:[

      {Id:32}

      ]}]

      What actually happened was...:
      The command block did not activate and instead activated when I reversed the active effect command while they had the effect active.
      /execute if entity @a[tag=ZHS,tag=CoolDown,nbt=!{ActiveEffects:[

      {Id:32}

      ]}]

      I then had to yet again manually remove the exclamation point back to the original command to make it shut off.

      Steps to Reproduce:
      1. Give your character the tags ZHS and CoolDown as well as the Hero of the Village effect (as its Effect # is 32).
      2. Put a command block on repeat and always active with a comparator going into a redstone lamp. with the following command.
      /execute if entity @a[tag=ZHS,tag=CoolDown,nbt={ActiveEffects:[

      {Id:32}

      ]}]
      3. When you have the Hero of the village effect as well as the tags the redstone lamp and comparator should light up but doesn't. Until you add in the exclamation point after the = after nbt in the command line.

            Unassigned Unassigned
            KorBush97 KorBush97
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: