Use singleton in Village class to work around null issue that evades
This commit is contained in:
parent
836ec9dc1a
commit
ca7c627ded
|
@ -1,4 +1,4 @@
|
||||||
From 04fd8f7d4f3cd1c3351ef21c0c6b17108f9db68a Mon Sep 17 00:00:00 2001
|
From 7ff983308b59dcb1c547aff7950be49305211165 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
||||||
Subject: [PATCH] Pass world to Village creation
|
Subject: [PATCH] Pass world to Village creation
|
||||||
|
@ -19,7 +19,7 @@ index 107f582..140b14b 100644
|
||||||
village.a(nbttagcompound1);
|
village.a(nbttagcompound1);
|
||||||
this.villages.add(village);
|
this.villages.add(village);
|
||||||
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
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
|
--- a/src/main/java/net/minecraft/server/Village.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Village.java
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
||||||
@@ -22,7 +22,7 @@ public class Village {
|
@@ -22,7 +22,7 @@ public class Village {
|
||||||
|
@ -31,6 +31,15 @@ index 932eeb7..9b59dcb 100644
|
||||||
this.c = BlockPosition.ZERO;
|
this.c = BlockPosition.ZERO;
|
||||||
this.d = BlockPosition.ZERO;
|
this.d = BlockPosition.ZERO;
|
||||||
this.j = new TreeMap();
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue