diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 2947b69b0a..1110e740b3 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -1880,6 +1880,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + map.put(EntityType.FIREBALL, -1); + map.put(EntityType.SMALL_FIREBALL, -1); + }); ++ public boolean flushRegionsOnSave = false; + } + + public FishingTimeRange fishingTimeRange; diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 73c26ca139..407f1d6848 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -5749,6 +5749,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + if (flush) { + RegionFileIOThread.flush(); ++ if (this.world.paperConfig().chunks.flushRegionsOnSave) { ++ try { ++ this.world.chunkSource.chunkMap.regionFileCache.flush(); ++ } catch (IOException ex) { ++ LOGGER.error("Exception when flushing regions in world {}", this.world.getWorld().getName(), ex); ++ } ++ } + } + if (logProgress) { + LOGGER.info("Saved " + savedChunk + " block chunks, " + savedEntity + " entity chunks, " + savedPoi + " poi chunks in world '" + this.world.getWorld().getName() + "' in " + format.format(1.0E-9 * (System.nanoTime() - start)) + "s");