From ca7c627ded894aba6153bd3f5ca0f366e3ebd459 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 21 Mar 2016 10:28:45 -0500 Subject: [PATCH] Use singleton in Village class to work around null issue that evades --- .../0093-Pass-world-to-Village-creation.patch | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0093-Pass-world-to-Village-creation.patch b/Spigot-Server-Patches/0093-Pass-world-to-Village-creation.patch index f0f34a2159..c3871ec769 100644 --- a/Spigot-Server-Patches/0093-Pass-world-to-Village-creation.patch +++ b/Spigot-Server-Patches/0093-Pass-world-to-Village-creation.patch @@ -1,4 +1,4 @@ -From 04fd8f7d4f3cd1c3351ef21c0c6b17108f9db68a Mon Sep 17 00:00:00 2001 +From 7ff983308b59dcb1c547aff7950be49305211165 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 19 Mar 2016 15:16:54 -0400 Subject: [PATCH] Pass world to Village creation @@ -19,7 +19,7 @@ index 107f582..140b14b 100644 village.a(nbttagcompound1); this.villages.add(village); diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index 932eeb7..9b59dcb 100644 +index 932eeb7..06a06ea 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -22,7 +22,7 @@ public class Village { @@ -31,6 +31,15 @@ index 932eeb7..9b59dcb 100644 this.c = BlockPosition.ZERO; this.d = BlockPosition.ZERO; this.j = new TreeMap(); +@@ -391,7 +391,7 @@ public class Village { + NBTTagCompound nbttagcompound2 = nbttaglist1.get(j); + + if (nbttagcompound2.hasKey("UUID")) { +- UserCache usercache = this.a.getMinecraftServer().getUserCache(); ++ UserCache usercache = MinecraftServer.getServer().getUserCache(); // Paper - Bandaid for world being null + GameProfile gameprofile = usercache.a(UUID.fromString(nbttagcompound2.getString("UUID"))); + + if (gameprofile != null) { -- -2.7.4 +2.7.3