2018-08-06 01:46:43 +02:00
|
|
|
From ea8fdac269a25dbe9984c82bbe321a61a079f16e Mon Sep 17 00:00:00 2001
|
2016-03-19 20:21:39 +01: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-08-06 01:46:43 +02:00
|
|
|
index c09326636c..3219ccca40 100644
|
2016-03-19 20:21:39 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
2018-07-15 03:53:17 +02:00
|
|
|
@@ -234,7 +234,7 @@ public class PersistentVillage extends PersistentBase {
|
2016-03-19 20:21:39 +01:00
|
|
|
|
|
|
|
for (int i = 0; i < nbttaglist.size(); ++i) {
|
2018-07-15 03:53:17 +02:00
|
|
|
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
2016-03-19 20:21:39 +01:00
|
|
|
- Village village = new Village();
|
|
|
|
+ Village village = new Village(world); // Paper
|
|
|
|
|
|
|
|
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
|
2018-08-06 01:46:43 +02:00
|
|
|
index e742cbe120..dfcabb83a1 100644
|
2016-03-19 20:21:39 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/Village.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -24,7 +24,7 @@ public class Village {
|
2016-06-09 05:57:14 +02:00
|
|
|
private final List<Village.Aggressor> k;
|
2016-03-19 20:21:39 +01: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 03:23:38 +01:00
|
|
|
this.j = Maps.newHashMap();
|
2016-03-19 20:21:39 +01:00
|
|
|
--
|
2018-07-04 09:55:24 +02:00
|
|
|
2.18.0
|
2016-03-19 20:21:39 +01:00
|
|
|
|