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

"/execute store result" does not work with the condition "if blocks <values here>"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 18w05a
    • None
    • Unconfirmed

      Running this command when the if condition is true will not change the score at all (value is already preset). This happens even when the score isn't currently set to 0.

       /execute store result score @p X if blocks <start> <end> <destination> all 

      Since "AffectedBlocks" is now part of "result", I expected the command to set the score to the number of blocks found by the "if blocks" section, but that did not happen. The execute command can stand alone as its own command without needing to use "run <some other command>", so that shouldn't be an issue. Adding "run say hi" to the end and activating the command will execute when the if condition is met, but result is set to 1 instead of the expected number of blocks, likely because if stores either a 1(succeeded) or 0(failed). There is currently no way afaik to get the number of affected blocks from testing an area. This wasn't an issue when we had /testforblocks in 1.12. Using /clone isn't acceptable because there is no need to change the blocks, there is only a need to test for a match. I could not find any matches to this issue, or at least nothing appeared to be the same issue that I have.

            Unassigned Unassigned
            RedstoneExplorer Aaron Rhodes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: