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

Using the stats command to display "AffectedBlocks" on the sidebar doesn't work correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 17w18b
    • None
    • Windows 10 (64 Bit), Java 1.8.0_111 64bit
    • Unconfirmed

      I recreated this bug 2 times.

      I was trying to display the "AffectedBlocks" stats of a clone command on the sidebar.
      First I wrote the following command inside an Impulse command block.

      clone ~ ~ ~ ~ 0 ~ -635 4 1452

      When executed, this command should give (and indeed does, when you look into the "Previous Output" bar) the number of blocks between the command block and Level 0 as an AffectedBlocks output.

      To achieve this, I applied the following stats-command on an armor stand called stats, while standing on top of the command block:

      /stats block ~ ~-1 ~ set AffectedBlocks @e[type=armor_stand,name=stats,c=1] Coordinate

      The stats were applied and I manually set the score of the armor stand for the objective "Coordinate" to "0", as this is necessary for the stats command to work.

      I now activated the Impulse command and the number 5 was displayed on the scoreboard. The correct number of blocks between the command block and Level 0. I now changed the command to:

      execute @a ~ ~ ~ clone ~ ~ ~ ~ 0 ~ -635 4 1452

      When executed the command should give me the number of blocks between the player and Level 0, however the number on the side didn't change, the output of the command block (when you look inside it) did. It displayed the Output "[19:56:16] 4 blocks cloned".

      When I changed it to the following command:

      clone ~ ~-1 ~ ~ 0 ~ -635 4 1452

      It again gave me the right output and it was displayed correctly on the sidebar.

      I tried storing the stats-Command on different entities, using Repeat, Chain and Impulse command blocks and switching between worlds.

        1. 2017-05-08_20.37.28.png
          2017-05-08_20.37.28.png
          78 kB
        2. 2017-05-08_20.43.51.png
          2017-05-08_20.43.51.png
          85 kB
        3. 2017-05-08_20.44.08.png
          2017-05-08_20.44.08.png
          82 kB
        4. 2017-05-08_20.45.59.png
          2017-05-08_20.45.59.png
          164 kB
        5. 2017-05-08_20.46.42.png
          2017-05-08_20.46.42.png
          75 kB
        6. 2017-05-08_20.46.52.png
          2017-05-08_20.46.52.png
          59 kB
        7. 2017-05-08_20.47.57.png
          2017-05-08_20.47.57.png
          56 kB
        8. 2017-05-08_20.49.59.png
          2017-05-08_20.49.59.png
          61 kB
        9. 78526716fcd44aca9217bd37b88e3e38 (1).webp
          34 kB

            Unassigned Unassigned
            AdrianKenobi Adrian Frost
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: