Fix NPE from using wrong ProtoChunk ctor (#6147)

This commit is contained in:
Jake Potrebic
2021-07-10 13:17:47 -07:00
parent dcdec7d59c
commit f359da1843
4 changed files with 33 additions and 38 deletions

View File

@@ -312,7 +312,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ default void setLastSaved(long ticks) {}
// Paper start
default boolean generateFlatBedrock() {
if (this instanceof ProtoChunk) {
if (this.getLevel() != null) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java