Convert Horses owner to UUID
This commit is contained in:
parent
39a3d7dde1
commit
1d37fe9bbe
28
CraftBukkit-Patches/0143-Convert-Horses-owner-to-UUID.patch
Normal file
28
CraftBukkit-Patches/0143-Convert-Horses-owner-to-UUID.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 13fb31ca6e4afa040ee6108db64d8bdf50b88f8d 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 5978ea3..1b1ed9b 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
||||||
|
@@ -1000,6 +1000,14 @@ 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");
|
||||||
|
--
|
||||||
|
1.8.3.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user