diff --git a/Spigot-Server-Patches/Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/Improve-Chunk-Status-Transition-Speed.patch index 868bc191dd..2fa7eecbdf 100644 --- a/Spigot-Server-Patches/Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/Improve-Chunk-Status-Transition-Speed.patch @@ -90,12 +90,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Nullable +@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + IChunkAccess ichunkaccess = (IChunkAccess) optional.get(); + + if (ichunkaccess.getChunkStatus().b(chunkstatus)) { +- CompletableFuture completablefuture1; ++ CompletableFuture> completablefuture1; // Paper + + if (chunkstatus == ChunkStatus.LIGHT) { + completablefuture1 = this.b(playerchunk, chunkstatus); @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.b(playerchunk, chunkstatus); } } - }, this.executor); -+ }, this.mainInvokingExecutor); // Paper - optimize chunk status progression without jumping through thread pool ++ }, this.mainInvokingExecutor).thenComposeAsync(CompletableFuture::completedFuture, this.mainInvokingExecutor); // Paper - optimize chunk status progression without jumping through thread pool - ensure main } }