13
0
geforkt von Mirrors/Paper

Don't validate chunk before it's been run through DataConverter (#7907)

Dieser Commit ist enthalten in:
Noah van der Aa 2022-06-09 18:39:02 +02:00 committet von GitHub
Ursprung a3a0390e3b
Commit 84434e6ae9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -1396,7 +1396,7 @@ index 0000000000000000000000000000000000000000..f1b940704400266e6df186139b57ec72
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
new file mode 100644
index 0000000000000000000000000000000000000000..aaf73da45e6ba6e990a94f63eb3da0e250153053
index 0000000000000000000000000000000000000000..e9070b6158e7e8c2dd33a9dcb20898a2f0d86e48
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
@@ -0,0 +1,148 @@
@ -1487,12 +1487,6 @@ index 0000000000000000000000000000000000000000..aaf73da45e6ba6e990a94f63eb3da0e2
+ return;
+ }
+
+ if (!ChunkMap.isChunkDataValid(chunkData.chunkData)) {
+ LOGGER.error("Chunk file at {} is missing level data, skipping", new ChunkPos(this.chunkX, this.chunkZ));
+ this.complete(ChunkLoadTask.createEmptyHolder());
+ return;
+ }
+
+ final ChunkPos chunkPos = new ChunkPos(this.chunkX, this.chunkZ);
+
+ final ChunkMap chunkManager = this.world.getChunkSource().chunkMap;
@ -1511,6 +1505,12 @@ index 0000000000000000000000000000000000000000..aaf73da45e6ba6e990a94f63eb3da0e2
+ return;
+ }
+
+ if (!ChunkMap.isChunkDataValid(chunkData.chunkData)) {
+ LOGGER.error("Chunk file at {} is missing level data, skipping", new ChunkPos(this.chunkX, this.chunkZ));
+ this.complete(ChunkLoadTask.createEmptyHolder());
+ return;
+ }
+
+ if (this.checkCancelled()) {
+ return;
+ }