mojira.dev
MC-79632

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

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.

Linked issues

Attachments

Comments 19

It's not a phantom, it's another entity. Perhaps you spawned another one, or it's an item. The phenomenon of it not counting up is because it's left your render distance. If this bug happens again, just do /say @e and report back what it gives.

I clearly said that there is not another Entity. The Game creates, as I said, a Custom Player. That's why it's score does not count up. When you don't believe me, I'd run now /say @e and it says: "[Rismosch] Rismosch and Armor Stand". When you still don't believe, just test it yourself. The game should not create anything when I just leave and reload; that is the bug.

PS: I just called it Phantom because i had no better idea for a name

use @a instead of @e, with @e all entitys will be on the leadboard. the ArmorStand is on the " /summon " . all things on it count as an entity

That is definitely the armor stand. No idea why it's not counting up though; that part may be a bug.

Again. I clearly said that the Phantom is not an entity. It acts and is definitely a Custom Player. That's why it's score is not counting up. The command only works for Entities. The Phantom is not the ArmorStand, otherwise there would be only one score for it and not two. Also they have different names.

And Etrotta Jier: I know what I am doing, and this bug appears only for Entities. Of course the bug is not happening to the Player when it only affect Non-Player Entities. So the selector is not the problem.

9 more comments

@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.

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

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

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.

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

Replace unknown ID with your ID.

Simon Sutoris

michael

Community Consensus

Minecraft 1.8.4

Minecraft 1.8.5

Retrieved