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

/stats (CommandStats) doesn't work for MinecartCommandBlocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.8.9, Minecraft 16w02a, Minecraft 16w04a, Minecraft 1.9 Pre-Release 3, Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 1.12.1
    • None
    • Windows 7 64-bit, Java 8
    • Confirmed

      A MinecartCommandBlock with CommandStats does not update the given scoreboard objective upon executing the command, whether it is successful or not.

      Steps to reproduce:

      1. Create a new score:

      /scoreboard objectives add myscore dummy

      2. Set the display of this score:

      /scoreboard objectives setdisplay sidebar myscore

      3. Initialize your score:

      /scoreboard players set @p myscore 0

      4. Summon a MinecartCommandBlock:

      /summon MinecartCommandBlock ~ ~ ~

      5. Use the /stats command to populate the MinecartCommandBlock's CommandStats:

      /stats entity @e[type=MinecartCommandBlock,r=1] set SuccessCount @p myscore

      6. Confirm the CommandStats exist and are correct:

      /entitydata @e[type=MinecartCommandBlock,r=1] \{}

      7. Enter a command you know will succeed into the MinecartCommandBlock, such as:

      say Hello world!

      8. Run the MinecartCommandBlock (e.g. by pushing it on to a powered activator rail) and notice that your score does not change.

      Current workaround:
      Oddly enough, it does work if you have the MinecartCommandBlock execute the original command through itself:

      execute @e[type=MinecartCommandBlock,r=0] ~ ~ ~ say Hello world!

      However, in order for this workaround to be reliable you must give the MinecartCommandBlock a unique custom name and execute the command through this name. Even so, this should not be necessary as the MinecartCommandBlock is the entity who is invoking the command in the first place. The CommandStats should update the respective score(s) without having to use the otherwise redundant execute command.

            Unassigned Unassigned
            Arcensoth Arcensoth
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: