Fix faulty logic in Auto Save check - Fixes #443
This commit is contained in:
parent
493caa07b4
commit
3725f9d940
|
@ -1,4 +1,4 @@
|
|||
From 11a88b05460b3817a48f74e5326416ef447b9eb2 Mon Sep 17 00:00:00 2001
|
||||
From 62796acb6d14f2865b036decbdef62089e4870a1 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 19 Sep 2016 23:16:39 -0400
|
||||
Subject: [PATCH] Auto Save Improvements
|
||||
|
@ -42,18 +42,23 @@ index fb67306..eacb1f6 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 683a6dd..547628a 100644
|
||||
index 683a6dd..2314ce0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -960,7 +960,7 @@ public class Chunk {
|
||||
@@ -960,11 +960,9 @@ public class Chunk {
|
||||
if (this.t && this.world.getTime() != this.lastSaved || this.s) {
|
||||
return true;
|
||||
}
|
||||
- } else if (this.t && this.world.getTime() >= this.lastSaved + MinecraftServer.getServer().autosavePeriod * 4) { // Spigot - Only save if we've passed 2 auto save intervals without modification
|
||||
+ } else if (this.t && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod) { // Spigot // Paper - Make world configurable and incremental
|
||||
return true;
|
||||
- return true;
|
||||
}
|
||||
-
|
||||
- return this.s;
|
||||
+ // This !flag section should say if s(isModified) or t(hasEntities), then check auto save
|
||||
+ return ((this.s || this.t) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod); // Paper - Make world configurable and incremental
|
||||
}
|
||||
|
||||
public Random a(long i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 3828da7..7e53fee 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
|
@ -140,5 +145,5 @@ index fc33575..81712ff 100644
|
|||
timings.worldSaveChunks.startTiming(); // Paper
|
||||
chunkproviderserver.a(flag);
|
||||
--
|
||||
2.9.3
|
||||
2.10.2
|
||||
|
||||
|
|
Loading…
Reference in New Issue