3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00
Paper/CraftBukkit-Patches/0126-Convert-Horses-owner-to-UUID.patch
Zach Brown 5b4bc3081a Update from upstream SpigotMC
Upstream merge (we must go deeper) SpigotMC/Spigot@1e7bc383c3
2014-08-18 10:43:17 -05:00

29 Zeilen
1.2 KiB
Diff

From b194f0f92b7a35840d48e4c55bcda7de31b326ee 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 d167c00..e9f6236 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -993,6 +993,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.9.1