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

/testfor command does not work as it should

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.7.2
    • Windows 7, Java 7
    • Unconfirmed

      I apologize if this is a duplicate.

      I was working on a project in one of my worlds. I added a dummy scoreboard objective, and made sure my value was set to 0. Then I put down 10 command blocks with comparators as the output that tested for the values 1-10. When I powered them, every single comparator lit up, even though my value was set at 0. There were no typos in any of the command blocks. I also tried changing my value to one of the tested for values, but still, all of the comparators lit up.

      Commands used:

      scoreboard objectives add days dummy Days
      scoreboard players set @a days 0
      testfor @r[score_days=1]
      testfor @r[score_days=2]
      testfor @r[score_days=3]
      testfor @r[score_days=4]
      testfor @r[score_days=5]
      testfor @r[score_days=6]
      testfor @r[score_days=7]
      testfor @r[score_days=8]
      testfor @r[score_days=9]
      testfor @r[score_days=10]
      

      What I expected to happen was:
      None of the comparators would light up, as none of the command blocks tested for my value.

      What actually happened was:
      All of the comparators lit up.

      Steps to reproduce:
      1. Create a dummy scoreboard objective
      2. Set your value to any number
      3. Put down command blocks with comparators that test for your number and other values
      4. Power all of them

            Unassigned Unassigned
            fahrenheit646 Ethan Wanless
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: