mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
e7f3ca4505
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
26 lines
No EOL
1.2 KiB
Diff
26 lines
No EOL
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
@@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
|
if (nbttagcompound.hasKeyOfType("OwnerUUID", 8)) {
|
|
this.setOwnerUUID(nbttagcompound.getString("OwnerUUID"));
|
|
}
|
|
+ // Spigot start
|
|
+ else if (nbttagcompound.hasKey("OwnerName")) {
|
|
+ String owner = nbttagcompound.getString("OwnerName");
|
|
+ if (owner != null && !owner.isEmpty()) {
|
|
+ this.setOwnerUUID(NameReferencingFileConverter.a(owner));
|
|
+ }
|
|
+ }
|
|
+ // Spigot end
|
|
// CraftBukkit start
|
|
if (nbttagcompound.hasKey("Bukkit.MaxDomestication")) {
|
|
this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
|
|
--
|