mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Mark chunks as saved after saving them
Prevents re-saving them again later.
This commit is contained in:
parent
05bd9d67b7
commit
b8131a09b2
1 changed files with 6 additions and 3 deletions
|
@ -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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e2e3c59ad
|
index 0000000000000000000000000000000000000000..4ce6df7082d4f7ed3651e3d57e379f95dd05715e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
+++ 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;
|
+package io.papermc.paper.chunk.system.scheduling;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.completable.Completable;
|
+import ca.spottedleaf.concurrentutil.completable.Completable;
|
||||||
|
@ -10845,6 +10845,8 @@ index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e
|
||||||
+
|
+
|
||||||
+ task.queue();
|
+ task.queue();
|
||||||
+
|
+
|
||||||
|
+ chunk.setUnsaved(false);
|
||||||
|
+
|
||||||
+ return true;
|
+ return true;
|
||||||
+ } catch (final ThreadDeath death) {
|
+ } catch (final ThreadDeath death) {
|
||||||
+ throw death;
|
+ throw death;
|
||||||
|
@ -10863,6 +10865,7 @@ index 0000000000000000000000000000000000000000..f20faaec3f1fe311b3ac989be5a9148e
|
||||||
+ } else {
|
+ } else {
|
||||||
+ RegionFileIOThread.scheduleSave(this.world, this.chunkX, this.chunkZ, save, RegionFileIOThread.RegionFileType.CHUNK_DATA);
|
+ RegionFileIOThread.scheduleSave(this.world, this.chunkX, this.chunkZ, save, RegionFileIOThread.RegionFileType.CHUNK_DATA);
|
||||||
+ }
|
+ }
|
||||||
|
+ chunk.setUnsaved(false);
|
||||||
+ } catch (final ThreadDeath death) {
|
+ } catch (final ThreadDeath death) {
|
||||||
+ throw death;
|
+ throw death;
|
||||||
+ } catch (final Throwable thr) {
|
+ } catch (final Throwable thr) {
|
||||||
|
@ -12546,7 +12549,7 @@ index c59fca05484c30b28e883f5b5dde0362f294b517..0c6534e64ef023cf613f2c5407c7598c
|
||||||
|
|
||||||
private ChunkSystem() {
|
private ChunkSystem() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
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
|
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -1,15 +1,28 @@
|
@@ -1,15 +1,28 @@
|
||||||
|
|
Loading…
Reference in a new issue