mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
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.
This commit is contained in:
parent
9747174b40
commit
8e46a01608
1 changed files with 3 additions and 3 deletions
|
@ -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");
|
||||
+ }
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue