[MC-79632] Phantom Custom Player in Scoreboard / UUIDs of non-player entities on scoreboards truncated after relog Created: 17/Apr/15  Updated: 03/Aug/15  Resolved: 19/Apr/15

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.8.4
Fix Version/s: Minecraft 1.8.5

Type: Bug
Reporter: Simon Sutoris Assignee: [Mojang] Searge (Michael Stoyke)
Resolution: Fixed Votes: 7
Labels: None

Attachments: Zip Archive 184 UUID bug.zip     Zip Archive 184 UUID bug.zip     PNG File Screenshot 1.png     PNG File Screenshot 2.png     PNG File Screenshot 3.png    
Issue Links:
Duplicate
is duplicated by MC-79699 1.8.4 corrupts scores of non-player e... Resolved
is duplicated by MC-79714 UUIDs on scoreboard get cut off after... Resolved
is duplicated by MC-79779 Loading world trims scoreboard names Resolved
is duplicated by MC-79916 Entities Lose Scoreboard Values After... Resolved
is duplicated by MC-80007 /scoreboard players does not work Resolved
is duplicated by MC-80045 Entity UUID's SHortening when Reloging Resolved
is duplicated by MC-80471 Entity UUIDs reset when the world is ... Resolved
CHK:
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.



 Comments   
Comment by Sad Ghoster [ 17/Apr/15 ]

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.

Comment by Simon Sutoris [ 17/Apr/15 ]

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

Comment by Etrotta Jier [ 17/Apr/15 ]

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

Comment by 1icri [ 18/Apr/15 ]

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

Comment by Simon Sutoris [ 18/Apr/15 ]

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.

Comment by Chris [ 18/Apr/15 ]

What I see:
In the third screenshot we have Rismotch (the player), that looks normal. We also have a UUID for the armour stand, that looks normal too.

But then the third one looks strange, it seems to be a truncated version of the armour stand's UUID. It could be a duplication in the scoreboard, or some other entity that really shouldn't be there. I'll do some tests to try and duplicate it and see what I can find.

Comment by Simon Sutoris [ 18/Apr/15 ]

From what I am knowing, the duplication is just a Custom Player. When you don't know, what this is, it's basicly a Player, that can only interact with the scoreboard. E.g. /scoreboard players set Hi a 1 creates the Custom Player "Hi" and sets his score a to 1. Because he does not exist in acts kind of a variable at the scoreboard, he is not an Entity. That means he can't interact with /scoreboard players add @e a 1. To interact with him, you have to use his name: /scoreboard players add Hi a 1. To delete him you just have to use reset: /scoreboard players reset Hi.

The duplication acts like a Custom Player: It can't interact with @e and you can only delete him with /scoreboard players reset <Insert the Name of the Phantom Here>. That's why I think the duplication is a Custom Player

Comment by Chris [ 18/Apr/15 ]

comes back

First thing, you might want to change the one command to: "/scoreboard players add @e[r=5] a 1"

Otherwise you get spammed with objectives for every entity loaded in the world.

Also I can confirm the 'phantom' is a duplicate of the first 16 letters of the entities UUID and it does the same for any non-player entity. It's likely this is happening because the scoreboard has a limit on the maximum player length and since entity UUIDs are longer they get trucated when the world saves. Then when you load the game again the saved names will no longer match the entitie's actual name/UUID and it will create a new one.

Not sure if this a legitimate bug or working as intended though. I would say working as intended as the player type of scoreboard objective is only really intended for use with players, but the bug is that it allows you to create objectives for non-players (or things with names that exceed the limit). It should throw an error in the same way that the teams scoreboard does for long names.

Edit: Sorry, did not see your reply. I think what youa re saying is correct. It is a custom player that only exists within the scoreboard.

Comment by Simon Sutoris [ 18/Apr/15 ]

I think not that this is intendet, because I used scoreboard for Entities quite often befor and it worked fine. Now in 1.8.4 this strange bug appeared

Comment by qmagnet [ 18/Apr/15 ]

Confirmed for 1.8.4
However, the description here is extremely confusing so I will attempt to explain the actual bug.

Bug:
Old entity UUIDs cannot be located properly in 1.8.4

Info:
Entity UUIDs transferred to 1.8.4 from previous versions, only keep their first 16 letters as Chris said.
However, this does actually break mechanics, as some scoreboards will not run and 1.8.4 cannot properly locate old UUIDs.
New ones must be created in order to actuvate scoreboards.

I've included a world file to indicate how the mechanics become broken.

World file - 184 UUID bug

  • When you load up the world, do so in 1.8.3 and see the UUID count increasing
  • Then load up the world in 1.8.4 and notice the phantom UUIDs
Comment by Sad Ghoster [ 18/Apr/15 ]

So, we should rename this bug to: Entity names in scoreboards truncate to 16 characters upon relog, breaking scoreboards

Comment by qmagnet [ 18/Apr/15 ]

I'm working on a second test world where it shows the scoreboard completely stop when 1.8.4 runs

Comment by qmagnet [ 18/Apr/15 ]

It's not dependent on relogging. 1.8.4 is the cause. If you revert back to 1.8.3, the problem will correct itself.

Comment by qmagnet [ 18/Apr/15 ]

Did some more testing. In my world file, the bug of stopping the score is specific to

/scoreboard players add @e[name=TestEntity,score_TestCount=19] TestCount 1

If the parameters if score_TestCount=19 are ignored, the UUIDs will continue.

/scoreboard players add @e[name=TestEntity] TestCount 1

This leads me to believe the score if actually being frozen inside the old UUID for some reason

Comment by Rubisk [ 19/Apr/15 ]

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

Comment by Rubisk [ 19/Apr/15 ]

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

Comment by [Mod] Mustek [ 19/Apr/15 ]

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

Comment by Robert Schuh [ 18/May/15 ]

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.

Comment by Markus G├╝nzler [ 19/May/15 ]

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

Replace unknown ID with your ID.

Generated at Sat May 26 16:40:21 CDT 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.