mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From 4794e17198632431883eba3787fdbbf99df2f43b Mon Sep 17 00:00:00 2001
|
|
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 d58f6b2a86..d14a9e3a3e 100644
|
|
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
|
@@ -202,7 +202,7 @@ public class PersistentVillage extends PersistentBase {
|
|
|
|
for(int i = 0; i < nbttaglist.size(); ++i) {
|
|
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(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 f87e8e05af..bda67faefe 100644
|
|
--- a/src/main/java/net/minecraft/server/Village.java
|
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
|
@@ -24,7 +24,7 @@ public class Village {
|
|
private final 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 = Maps.newHashMap();
|
|
--
|
|
2.19.0
|
|
|