diff --git a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch index a4f2fbaa8c..5edd11e6e3 100644 --- a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch @@ -3247,15 +3247,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (ioThrowable != null) { + com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable); + } -+ chunkHolder.tasks.forEach(Runnable::run); -+ // Paper end - if (nbttagcompound != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings - boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8); -+ if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async ++ this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData); ++ chunkHolder.tasks.forEach(Runnable::run); ++ // Paper end - if (flag) { - ProtoChunk protochunk = ChunkRegionLoader.loadChunk(this.world, this.definedStructureManager, this.m, chunkcoordintpair, nbttagcompound); ++ if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async ++ + if (true) { + ProtoChunk protochunk = chunkHolder.protoChunk; @@ -3410,12 +3412,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + synchronized (this) { // Paper - async io + RegionFile regionFile = this.regionFileCache.getFile(chunkPos, true); - -- ChunkStatus status = regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); ++ + if (regionFile == null || !regionFile.chunkExists(chunkPos)) { + return null; + } -+ + +- ChunkStatus status = regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); + ChunkStatus status = regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); - if (status != null) {