Support String UUID's in old player skulls
Should fix remaining skull issues for people with unconverted old skulls. Fixes #3734
This commit is contained in:
parent
b3f265d1b1
commit
a12a677859
2 changed files with 20 additions and 4 deletions
|
@ -7,6 +7,22 @@ We have stored UUID in plenty of places that did not get DFU'd
|
||||||
|
|
||||||
So just look for old format and load it if it exists.
|
So just look for old format and load it if it exists.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
|
index 66d503a91665952b98c8cdc06c9ad10782b0558b..dca47422816e0ff5cf56ee73d0aa7e2f74a48060 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
|
@@ -28,6 +28,11 @@ public final class GameProfileSerializer {
|
||||||
|
s = nbttagcompound.getString("Name");
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Paper start - support string UUID's
|
||||||
|
+ if (nbttagcompound.hasKeyOfType("Id", 8)) {
|
||||||
|
+ uuid = UUID.fromString(nbttagcompound.getString("Id"));
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
if (nbttagcompound.b("Id")) {
|
||||||
|
uuid = nbttagcompound.a("Id");
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
index f608b35502890650adfc1df35e0794471f57ecbc..436f40bcd7817bedde4f6570c7c47dba7ff7034f 100644
|
index f608b35502890650adfc1df35e0794471f57ecbc..436f40bcd7817bedde4f6570c7c47dba7ff7034f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
|
|
|
@ -9,10 +9,10 @@ growing to large sizes and preventing login.
|
||||||
This now automatically cleans up the extra properties.
|
This now automatically cleans up the extra properties.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d9957582634f3f3d85 100644
|
index dca47422816e0ff5cf56ee73d0aa7e2f74a48060..1fe44d4a1a1895f5715c720f9d7d7acb10e50f61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
+++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java
|
||||||
@@ -42,8 +42,8 @@ public final class GameProfileSerializer {
|
@@ -47,8 +47,8 @@ public final class GameProfileSerializer {
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
String s1 = (String) iterator.next();
|
String s1 = (String) iterator.next();
|
||||||
NBTTagList nbttaglist = nbttagcompound1.getList(s1, 10);
|
NBTTagList nbttaglist = nbttagcompound1.getList(s1, 10);
|
||||||
|
@ -23,7 +23,7 @@ index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d995758263
|
||||||
NBTTagCompound nbttagcompound2 = nbttaglist.getCompound(i);
|
NBTTagCompound nbttagcompound2 = nbttaglist.getCompound(i);
|
||||||
String s2 = nbttagcompound2.getString("Value");
|
String s2 = nbttagcompound2.getString("Value");
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ public final class GameProfileSerializer {
|
@@ -234,7 +234,7 @@ public final class GameProfileSerializer {
|
||||||
Optional<T> optional = iblockstate.b(nbttagcompound.getString(s));
|
Optional<T> optional = iblockstate.b(nbttagcompound.getString(s));
|
||||||
|
|
||||||
if (optional.isPresent()) {
|
if (optional.isPresent()) {
|
||||||
|
@ -32,7 +32,7 @@ index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d995758263
|
||||||
} else {
|
} else {
|
||||||
GameProfileSerializer.LOGGER.warn("Unable to read property: {} with value: {} for blockstate: {}", s, nbttagcompound.getString(s), nbttagcompound1.toString());
|
GameProfileSerializer.LOGGER.warn("Unable to read property: {} with value: {} for blockstate: {}", s, nbttagcompound.getString(s), nbttagcompound1.toString());
|
||||||
return s0;
|
return s0;
|
||||||
@@ -259,8 +259,8 @@ public final class GameProfileSerializer {
|
@@ -264,8 +264,8 @@ public final class GameProfileSerializer {
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue