From 8e46a01608965d3f034e80bec5e6babc135e0e5f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 20:33:14 -0400 Subject: [PATCH] Fix case where some skulls still have string UUID's These heads are technically outdated, but this patch shouldn't care about what format the original value was in, so keep it the same. --- .../Fix-client-rendering-skulls-from-same-user.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch index 03dc9c2cea..954b9d325e 100644 --- a/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("SkullOwner", 10)) { + NBTTagCompound owner = nbttagcompound.getCompound("SkullOwner"); + if (owner.hasKey("Id")) { -+ nbttagcompound.setUUID("SkullOwnerOrig", owner.getUUID("Id")); ++ nbttagcompound.map.put("SkullOwnerOrig", owner.map.get("Id")); + TileEntitySkull.sanitizeUUID(owner); + } + } @@ -56,8 +56,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Fix skulls of same owner - restore orig ID since we changed it on send to client + if (itemstack.tag.hasKey("SkullOwnerOrig")) { + NBTTagCompound owner = itemstack.tag.getCompound("SkullOwner"); -+ if (itemstack.tag.hasUUID("SkullOwnerOrig")) { -+ owner.setUUID("Id", itemstack.tag.getUUID("SkullOwnerOrig")); ++ if (itemstack.tag.hasKey("SkullOwnerOrig")) { ++ owner.map.put("Id", itemstack.tag.map.get("SkullOwnerOrig")); + itemstack.tag.remove("SkullOwnerOrig"); + } + }