diff --git a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch index 3e019445a5..5890301d6f 100644 --- a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch @@ -4182,6 +4182,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (immediate != null) { + return CompletableFuture.completedFuture(immediate.getBukkitChunk()); + } ++ } else { ++ CompletableFuture future = new CompletableFuture(); ++ world.getMinecraftServer().execute(() -> { ++ getChunkAtAsync(x, z, gen, urgent).whenComplete((chunk, err) -> { ++ if (err != null) { ++ future.completeExceptionally(err); ++ } else { ++ future.complete(chunk); ++ } ++ }); ++ }); ++ return future; + } + + return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> { diff --git a/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index a0ae6b33aa..b55c07d2f7 100644 --- a/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -823,7 +823,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { - } + return future; } + if (!urgent) {