Minecraft
  1. Minecraft
  2. MC-79632

Phantom Custom Player in Scoreboard / UUIDs of non-player entities on scoreboards truncated after relog

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.8.4
    • Fix Version/s: Minecraft 1.8.5
    • Security Level: Minecraft - Public (Viewable by everyone)
    • Labels:
      None
    • Confirmation Status:
      Community Consensus

      Description

      1: I created a custom scoreboard with this command:
      /scoreboard objectives add a dummy Age

      I displayed it with
      /scoreboard objectives setdisplay sidebar a

      2: I made a superfast clock with two commandblocks that fires 20 times in a second (see Screenshot 1)

      Fill in the upper Commandblock:
      /setblock ~ ~-1 ~ redstone_block

      and in the lower one
      /setblock ~ ~1 ~ stone

      In the other Commandblock, fill in
      /scoreboard players add @e a 1

      Start the clock by placing the Redstoneblock between the Commandblocks. I recommend to run following command, so that your chat will not get spammed:
      /gamerule commandBlockOutput false

      3: Summon any Entity (I tested it with ArmorStands)

      What I expected happening:
      Mine and the Entity's score will count up without an end. When I am closing the map and load it again, nothing special should happen.

      What instead happened:
      As I reloaded, the scoreboard of the Entity starts from the beginning and a "Phantom" Custom Player is shown at the scoreboard. The score of the new "Phantom" Player is not counting up. My score is counting up without resetting as it should.

      In Screenshot 2 you are seeing before reloading. Even when you can't see it in the picture, the score is actually counting up. Player "d42507a0-fd2d-4463-9b9a-c958fb5c3e92" is the ArmorStand. The Player "Rismosch" is me.

      In Screenshot 3 I reloaded the world. The ArmorStand started from beginning and the new "Phantom" "d42507a0-fd2d-44" is not counting up. You have to use the following command to delete him:
      /scoreboard players reset <Insert the Name of the Phantom Here>*

      The Bug is, that when you reload the world, the game creates a Custom Player for each Non-Player Entity and it resets their scores

      *(The Name of the "Phantom" depents on the summoned Entity. Because the Entityname is random, the "Phantom's" name will be random as well. Use the name that is shown in your game.)

      PS: I used this Redstonemechanism first in 1.8.3. The Bug appeard suddenly in 1.8.4.

      1. Screenshot 1.png
        76 kB
      2. Screenshot 2.png
        141 kB
      3. Screenshot 3.png
        141 kB

        Issue Links

          Activity

          Hide
          Rubisk added a comment -

          @Qmagnet

          What I think is happening is the following:

          World gets opened. Scores get read from the scoreboard.dat file, and cached to the right entities. Then the scoreboard is created, scores owner Id's get cut off.
          When you TEST for an entity using a selector, it'll look try obtain the score through the scoreboard. It'll find some names, but those are names, not UUIDs, due to them getting cut off. Therefore, it won't recognize the entity.
          If you add one to the score of an entity, it'll locate the entity without using the scoreboard, add 1 to it's score (which got cached to the proper entity before creating the scoreboard), and add 1 to the respective UUID of the entity. Since the score for the entity is still what it was, but just misinterpreted by the scoreboard that got created upon reloading it from the scoreboard.dat file, it's not going to get messed up in anyway.

          I've looked through the scoreboard.dat file, and they do get saved correctly with a proper UUID: http://gyazo.com/59144fbaf6329be43e9ded6a6ede5454
          The bad code is probably in loading the scoreboard from the memory, not in loading the scores for each individidual entity. I don't have a good enough understanding of the MC code to really specify where exactly it's messed up, but it's probably pretty easy for Mojang to look through their commits and find it with these hints.

          Show
          Rubisk added a comment - @Qmagnet What I think is happening is the following: World gets opened. Scores get read from the scoreboard.dat file, and cached to the right entities. Then the scoreboard is created, scores owner Id's get cut off. When you TEST for an entity using a selector, it'll look try obtain the score through the scoreboard. It'll find some names, but those are names, not UUIDs, due to them getting cut off. Therefore, it won't recognize the entity. If you add one to the score of an entity, it'll locate the entity without using the scoreboard, add 1 to it's score (which got cached to the proper entity before creating the scoreboard), and add 1 to the respective UUID of the entity. Since the score for the entity is still what it was, but just misinterpreted by the scoreboard that got created upon reloading it from the scoreboard.dat file, it's not going to get messed up in anyway. I've looked through the scoreboard.dat file, and they do get saved correctly with a proper UUID: http://gyazo.com/59144fbaf6329be43e9ded6a6ede5454 The bad code is probably in loading the scoreboard from the memory, not in loading the scores for each individidual entity. I don't have a good enough understanding of the MC code to really specify where exactly it's messed up, but it's probably pretty easy for Mojang to look through their commits and find it with these hints.
          Hide
          Rubisk added a comment - - edited

          In my independent bug report Searge marked it as fixed, not sure if he misclicked the duplicate or actually fixed it but we'll see: MC-79714

          Show
          Rubisk added a comment - - edited In my independent bug report Searge marked it as fixed, not sure if he misclicked the duplicate or actually fixed it but we'll see: MC-79714
          Hide
          [Mod] Mustek added a comment -

          Made this the main ticket and resolved the other as a duplicate towards this one. More information can be found on this report.

          Show
          [Mod] Mustek added a comment - Made this the main ticket and resolved the other as a duplicate towards this one. More information can be found on this report.
          Hide
          Robert Schuh added a comment -

          This Looks like the second half of the Entity ID isn't loaded from the scoreboard file. A vrey nasty bug when working with scoreboards and entitys. Nasty.

          Show
          Robert Schuh added a comment - This Looks like the second half of the Entity ID isn't loaded from the scoreboard file. A vrey nasty bug when working with scoreboards and entitys. Nasty.
          Hide
          Markus Günzler added a comment -

          Have uploaded a larger folder, because I have the command changed somewhat. not more

          Replace unknown ID with your ID.

          Show
          Markus Günzler added a comment - Have uploaded a larger folder, because I have the command changed somewhat. not more Replace unknown ID with your ID.

            People

            • Assignee:
              [Mojang] Searge (Michael Stoyke)
              Reporter:
              Simon Sutoris
            • Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: