mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 517e5c21efe83837102eb110d9375f073c981a74 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 16 Apr 2014 01:40:30 -0400
|
|
Subject: [PATCH] Convert Horses owner to UUID
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
index 14cb7f1..0606319 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
@@ -1016,6 +1016,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
|
s = nbttagcompound.getString("OwnerUUID");
|
|
} else {
|
|
String s1 = nbttagcompound.getString("Owner");
|
|
+ // Spigot start
|
|
+ if ( s1 == null || s1.isEmpty() )
|
|
+ {
|
|
+ if (nbttagcompound.hasKey("OwnerName")) {
|
|
+ String owner = nbttagcompound.getString("OwnerName");
|
|
+ if (owner != null && !owner.isEmpty()) {
|
|
+ s1 = owner;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ // Spigot end
|
|
|
|
s = NameReferencingFileConverter.a(s1);
|
|
}
|
|
--
|
|
2.1.4
|
|
|