2018-09-29 07:31:59 +08:00
|
|
|
From 4794e17198632431883eba3787fdbbf99df2f43b Mon Sep 17 00:00:00 2001
|
2016-03-20 03:21:39 +08:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
|
|
|
Subject: [PATCH] Pass world to Village creation
|
|
|
|
|
|
|
|
fixes NPE bug #95
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
|
2018-09-01 06:56:57 +08:00
|
|
|
index d58f6b2a86..d14a9e3a3e 100644
|
2016-03-20 03:21:39 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
2018-09-01 06:56:57 +08:00
|
|
|
@@ -202,7 +202,7 @@ public class PersistentVillage extends PersistentBase {
|
2016-03-20 03:21:39 +08:00
|
|
|
|
2018-09-01 06:56:57 +08:00
|
|
|
for(int i = 0; i < nbttaglist.size(); ++i) {
|
2018-07-15 09:53:17 +08:00
|
|
|
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
2016-03-20 03:21:39 +08:00
|
|
|
- Village village = new Village();
|
|
|
|
+ Village village = new Village(world); // Paper
|
|
|
|
village.a(nbttagcompound1);
|
|
|
|
this.villages.add(village);
|
2018-09-01 06:56:57 +08:00
|
|
|
}
|
2016-03-20 03:21:39 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
2018-08-27 02:11:49 +08:00
|
|
|
index f87e8e05af..bda67faefe 100644
|
2016-03-20 03:21:39 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/Village.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
2016-11-17 10:23:38 +08:00
|
|
|
@@ -24,7 +24,7 @@ public class Village {
|
2016-06-09 11:57:14 +08:00
|
|
|
private final List<Village.Aggressor> k;
|
2016-03-20 03:21:39 +08:00
|
|
|
private int l;
|
|
|
|
|
|
|
|
- public Village() {
|
|
|
|
+ private Village() { // Paper - Nothing should call this - world needs to be set.
|
|
|
|
this.c = BlockPosition.ZERO;
|
|
|
|
this.d = BlockPosition.ZERO;
|
2016-11-17 10:23:38 +08:00
|
|
|
this.j = Maps.newHashMap();
|
2016-03-20 03:21:39 +08:00
|
|
|
--
|
2018-09-29 07:31:59 +08:00
|
|
|
2.19.0
|
2016-03-20 03:21:39 +08:00
|
|
|
|