From 84434e6ae9300acc4cb8ad8a0c0eafe462d67916 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Thu, 9 Jun 2022 18:39:02 +0200 Subject: [PATCH] Don't validate chunk before it's been run through DataConverter (#7907) --- .../0252-Asynchronous-chunk-IO-and-loading.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch index e49648ecd6..27e0516a0f 100644 --- a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch @@ -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; + }