2016-03-20 05:53:34 +01:00
|
|
|
From 04fd8f7d4f3cd1c3351ef21c0c6b17108f9db68a 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
|
|
|
|
index 107f582..140b14b 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
|
|
@@ -236,7 +236,7 @@ public class PersistentVillage extends PersistentBase {
|
|
|
|
|
|
|
|
for (int i = 0; i < nbttaglist.size(); ++i) {
|
|
|
|
NBTTagCompound nbttagcompound1 = nbttaglist.get(i);
|
|
|
|
- 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
|
|
|
|
index 932eeb7..9b59dcb 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 {
|
|
|
|
private List<Village.Aggressor> k;
|
|
|
|
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;
|
|
|
|
this.j = new TreeMap();
|
|
|
|
--
|
2016-03-20 05:53:34 +01:00
|
|
|
2.7.4
|
2016-03-19 20:21:39 +01:00
|
|
|
|