diff options
author | Spottedleaf <[email protected]> | 2022-10-23 09:09:18 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2022-10-23 09:09:18 -0700 |
commit | b8131a09b29d86d0a7870128959a7a5df8225378 (patch) | |
tree | addf66eefe61bdaa707a2d32f7d47bc44f204c36 | |
parent | 05bd9d67b726a89d1d919b509228994dde2d3495 (diff) | |
download | Paper-b8131a09b29d86d0a7870128959a7a5df8225378.tar.gz Paper-b8131a09b29d86d0a7870128959a7a5df8225378.zip |
Mark chunks as saved after saving them
Prevents re-saving them again later.
-rw-r--r-- | patches/server/0016-Rewrite-chunk-system.patch | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/patches/server/0016-Rewrite-chunk-system.patch b/patches/server/0016-Rewrite-chunk-system.patch index 1df2fdeeb1..74a4470d3a 100644 --- a/patches/server/0016-Rewrite-chunk-system.patch +++ b/patches/server/0016-Rewrite-chunk-system.patch @@ -9000,10 +9000,10 @@ index 0000000000000000000000000000000000000000..396d72c00e47cf1669ae20dc839c1c96 +} diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java new file mode 100644 -index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e2e3c59ad +index 0000000000000000000000000000000000000000..4ce6df7082d4f7ed3651e3d57e379f95dd05715e --- /dev/null +++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -@@ -0,0 +1,2072 @@ +@@ -0,0 +1,2075 @@ +package io.papermc.paper.chunk.system.scheduling; + +import ca.spottedleaf.concurrentutil.completable.Completable; @@ -10845,6 +10845,8 @@ index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e + + task.queue(); + ++ chunk.setUnsaved(false); ++ + return true; + } catch (final ThreadDeath death) { + throw death; @@ -10863,6 +10865,7 @@ index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e + } else { + RegionFileIOThread.scheduleSave(this.world, this.chunkX, this.chunkZ, save, RegionFileIOThread.RegionFileType.CHUNK_DATA); + } ++ chunk.setUnsaved(false); + } catch (final ThreadDeath death) { + throw death; + } catch (final Throwable thr) { @@ -12546,7 +12549,7 @@ index c59fca05484c30b28e883f5b5dde0362f294b517..0c6534e64ef023cf613f2c5407c7598c private ChunkSystem() { diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index b310d51b7fe3e8cef0a450674725969fe1ce78a4..c9e169a6dca4dd8fe6e27a23deb410664a5d4466 100644 +index 9db975e84609956b2206076e30f17a350adb77d6..f99929c0c5652dedf94b7e34ba599cedf5daf508 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,15 +1,28 @@ |