Fix NPE when disabling certain structure generators
This commit is contained in:
@@ -222,6 +222,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
|
||||
Reference in New Issue
Block a user