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

command block testfor command does not work with coordinate arguments

XMLWordPrintable

    • Unconfirmed
    • Creative

      When I put "testfor x=7,y=5,z=32" in a command block and hooked it up to a redstone clock so that it would update itself and put a redstone comparitor in front of it...

      What I expected to happen was...:
      -When I was at coordinates "7 5 32", the comparitor would turn on, powering the redstone in front of it
      -When I was not at said coordinates, the comparitor would turn off

      What actually happened was...:
      As soon as the command was entered in the command block, the comparitor turned on, and refused to turn off no matter where i was (including those coordinates)

      Steps to Reproduce:
      1. Place a command block
      2. Place a redstone comparitor facing out from the command block
      3. In the command block, type the following: "testfor @p[x=<your x coordinate>,y=<your y coordinate,z=<your z coordinate>]"
      4. Place a redstone repeater facing out from the comparitor
      5. Place a redstone lamp so that it gets input from the redstone repeater
      6. Hook the command block up to a redstone clock (google how to do this if you don't know)

      All other commands and testfor arguments work perfectly for me.

      Edit:
      At the input of a commenter, I included a maximum search radius argument ("r=<radius>"). Now the command block acts as if the search radius argument was the only argument, turning on when I am in radius and off when I am out of radius, regardless of coordinates.

        1. 2013-03-17_13.50.52.png
          2013-03-17_13.50.52.png
          513 kB
        2. 2013-03-17_13.50.13.png
          2013-03-17_13.50.13.png
          339 kB
        3. 2013-03-17_13.50.08.png
          2013-03-17_13.50.08.png
          441 kB
        4. 2013-03-17_13.48.09.png
          2013-03-17_13.48.09.png
          154 kB
        5. 2013-03-17_13.48.06.png
          2013-03-17_13.48.06.png
          234 kB
        6. 2013-03-17_13.48.03.png
          2013-03-17_13.48.03.png
          236 kB
        7. 2013-03-17_13.47.57.png
          2013-03-17_13.47.57.png
          257 kB
        8. 11-1-13[2334@-5gmt]Bueller.png
          11-1-13[2334@-5gmt]Bueller.png
          229 kB

            Unassigned Unassigned
            clarinetncleats3 Evan B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: