-
Bug
-
Resolution: Fixed
-
Minecraft 1.9, Minecraft 16w33a, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 17w46a
-
Confirmed
The bug
When you try to summon an entity with the same UUID another entity already has, the entity cannot be summoned.
Run for example the following command twice and look in the launcher.
/summon armor_stand ~ ~ ~ {UUIDLeast:1L,UUIDMost:1L}
[Server thread/WARN]: Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0001-0000-000000000001
However when a player with that UUID already exists it shows null instead of "Player".
[Server thread/WARN]: Keeping entity null that already exists with UUID 0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822
How to reproduce
- Get your UUID using for example NameMC
- Copy the UUID with the hyphens
- Use for example JDOODLE to run the following code, after replacing <UUID> with your UUID
pre 1.11
java.util.UUID uuid = java.util.UUID.fromString("<UUID>"); System.out.println(String.format("/summon ArmorStand ~ ~ ~ {UUIDMost:%sL,UUIDLeast:%sL}", uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()));
1.11+java.util.UUID uuid = java.util.UUID.fromString("<UUID>"); System.out.println(String.format("/summon armor_stand ~ ~ ~ {UUIDMost:%sL,UUIDLeast:%sL}", uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()));
- Use the created command in Minecraft
The reason
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the class net.minecraft.entity.EntityList does not create a mapping for players. This causes the method net.minecraft.entity.EntityList.getEntityString(Entity) to return null. Having this method return "Player" for players makes the method net.minecraft.entity.Entity.getHoverEvent() show "Player" as type, which is not correct because players do not have an entity type value.