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

Weird behavior with /execute scoreboard on a dead player

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 16w03a
    • None
    • Unconfirmed

      So while messing around with some things for a custom map, I tried to execute some operations with dead players and found a weird behavior, to help you visualize said behavior you'll need to do some things first, first you'll need two objectives:

      /scoreboard objectives add BugTest dummy
      /scoreboard objectives add Health health
      

      Then set the sidebar display to BugTest:

      /scoreboard objectives setdisplay sidebar BugTest
      

      Now you'll need 3 armor stands called Test1, Test2 and Test3:

      /summon ArmorStand ~ ~1 ~ {CustomName:"Test1",CustomNameVisible:1,NoGravity:1}
      /summon ArmorStand ~ ~1 ~ {CustomName:"Test2",CustomNameVisible:1,NoGravity:1}
      /summon ArmorStand ~ ~1 ~ {CustomName:"Test3",CustomNameVisible:1,NoGravity:1}
      

      Now in a clock and some chain command blocks do these in this order and make them run:

      /scoreboard players add @p BugTest 1
      /execute @a[score_Health=0] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=Test1] BugTest 10
      /execute @a[score_Health=0] ~ ~ ~ scoreboard players add @e[type=ArmorStand,name=Test2] BugTest 1
      /execute @a[score_Health=0] ~ ~ ~ scoreboard players operation @e[type=ArmorStand,name=Test3] BugTest = @p BugTest
      

      Now execute this command to initialize the armor stand's score:

      /scoreboard players set @e[type=ArmorStand] BugTest 0
      

      (The first image should help you understand the setup (The last command block on the right is just to reset the armor stands score to 0))

      So now that the setup is done, you should be seeing the BugTest go up on your sidebar, and the armor stands at 0. The way the chained commands are intended to work is that the dead player (health=0) would execute in each tick a command that changed each armor stand's score in a certain way.
      The first command is a scoreboard "SET", and while the player is dead he should be setting Test1's score to 10 each tick.
      The second command is a scoreboard "ADD", and while the player is dead he should be incrementing Test2's score by 1 each tick.
      The third command is a scoreboard "OPERATION", and while the player is dead he should be copying his score to Test3's score every tick.

      Now in order to test it, you'll need to kill yourself, and when you do that you will see that while Test1 and Test2 are working as intended, Test3 is not (Second picture), but it is set as soon as I click respawn (when the score Health probably isn't 0 anymore) (Third picture)

      I think the issue is because i'm making a dead player execute another command, but still, the other first two commands work, why would the third one not work?

            Unassigned Unassigned
            CroshB CroshB
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: