Fix NPE when disabling certain structure generators
This commit is contained in:
parent
1a53596cb0
commit
4bd0540daa
@ -1,4 +1,4 @@
|
|||||||
From e7bb70ef7370f640ecdebf413da425aab8f839f2 Mon Sep 17 00:00:00 2001
|
From c903fee4eac76019e6961b8f046a5dc93fe96a3b Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 2 Jun 2015 00:41:23 -0700
|
Date: Tue, 2 Jun 2015 00:41:23 -0700
|
||||||
Subject: [PATCH] Generator Settings
|
Subject: [PATCH] Generator Settings
|
||||||
@ -222,6 +222,18 @@ index 2f01bbf..0156892 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Chunk getChunkAt(BlockPosition blockposition) {
|
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
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||||
index 557561c..8491d3b 100644
|
index 557561c..8491d3b 100644
|
||||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||||
|
Loading…
Reference in New Issue
Block a user