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

testforblock command not working with execute command.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 14w08a
    • Minecraft 14w07a
    • None
    • Mac OSX
    • Unconfirmed

      I was working on a minecraft project, and wanted to test the block under a mob or player. I placed a command block with a redstone clock and comparator and typed in the command "/execute @e[type=Sheep,c=1] ~ ~-1 ~ testforblock ~ ~ ~ grass" and expected it to emit a signal when there was grass under the sheep, and not when there was a different block (i.e. sand). However, it emitted a signal whenever there was a sheep at all, even if it was standing on sand. I think this should be changed in order to be able to test the block under an entity, mob, or player accurately. This is how to get the glitch: Set up a command block with a redstone clock and comparator at the other side. Then type in the command "/execute @e[type=Sheep,c=1] ~ ~-1 ~ testforblock ~ ~ ~ grass" You could also set it up to test the block under the player to make it easier, like this: "/execute @p ~ ~-1 ~ testforblock ~ ~ ~ grass". I hope this glitch is fixed!

            searge [Mojang] Searge (Michael Stoyke)
            mathman99 Joshua Herring
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: