Don't save players every tick, oops
This commit is contained in:
parent
a63d6e9ea8
commit
56857ae801
|
@ -1,4 +1,4 @@
|
|||
From af0ca0d1f3a9bba5938e9880f823ad71953d8d71 Mon Sep 17 00:00:00 2001
|
||||
From 264f8e1152df767154c82b0723c0b4f4421e2157 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 19 Sep 2016 23:16:39 -0400
|
||||
Subject: [PATCH] Incremental Auto Saving
|
||||
|
@ -32,10 +32,10 @@ index 1ba02f1..0410bf2 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8ca8fbf..897bb5f 100644
|
||||
index 8ca8fbf..8deb679 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -745,7 +745,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -745,10 +745,10 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
this.q.b().a(agameprofile);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,11 @@ index 8ca8fbf..897bb5f 100644
|
|||
+ if (autosavePeriod > 0 /*&& this.ticks % autosavePeriod == 0*/) { // CraftBukkit // Paper - Incremental Auto Saving
|
||||
MinecraftTimings.worldSaveTimer.startTiming(); // Spigot
|
||||
this.methodProfiler.a("save");
|
||||
this.v.savePlayers();
|
||||
- this.v.savePlayers();
|
||||
+ if (this.ticks % autosavePeriod == 0) this.v.savePlayers(); // Paper - Incremental Auto Saving
|
||||
// Spigot Start
|
||||
// We replace this with saving each individual world as this.saveChunks(...) is broken,
|
||||
// and causes the main thread to sleep for random amounts of time depending on chunk activity
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 5ed6d3e..a47bfee 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
|
|
Loading…
Reference in New Issue