From 4bd0540daa907b905e394c1d86c0f288a60786d3 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 2 Jun 2015 01:40:46 -0700 Subject: [PATCH] Fix NPE when disabling certain structure generators --- .../0054-Generator-Settings.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0054-Generator-Settings.patch b/Spigot-Server-Patches/0054-Generator-Settings.patch index 146a635..02534e0 100644 --- a/Spigot-Server-Patches/0054-Generator-Settings.patch +++ b/Spigot-Server-Patches/0054-Generator-Settings.patch @@ -1,4 +1,4 @@ -From e7bb70ef7370f640ecdebf413da425aab8f839f2 Mon Sep 17 00:00:00 2001 +From c903fee4eac76019e6961b8f046a5dc93fe96a3b Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 2 Jun 2015 00:41:23 -0700 Subject: [PATCH] Generator Settings @@ -222,6 +222,18 @@ index 2f01bbf..0156892 100644 } public Chunk getChunkAt(BlockPosition blockposition) { +diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java +index 0f8211a..859fcfc 100644 +--- a/src/main/java/net/minecraft/server/StructureGenerator.java ++++ b/src/main/java/net/minecraft/server/StructureGenerator.java +@@ -88,6 +88,7 @@ public abstract class StructureGenerator extends WorldGenBase { + } + + public boolean b(BlockPosition blockposition) { ++ if (this.c == null) return false; // PaperSpigot + this.a(this.c); + return this.c(blockposition) != null; + } diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java index 557561c..8491d3b 100644 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java