mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: RednedEpic <redned235@gmail.com>
|
|
Date: Thu, 27 Apr 2023 23:09:13 -0700
|
|
Subject: [PATCH] PaperPR #9149 Flush region files on save
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
|
index 830d863cd9665d58875bfa5ca2bcd22f89ab2d49..51018f8b7176c72231fc0d0c23878659ab5c1b5b 100644
|
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
|
@@ -257,6 +257,11 @@ public final class ChunkHolderManager {
|
|
}
|
|
if (flush) {
|
|
RegionFileIOThread.flush();
|
|
+ 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");
|