From 7c6d0644a2ed1aaeacdfed499c0b5d9f54cd3e2f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:39:21 -0400 Subject: [PATCH] Don't save players every tick, oops --- Spigot-Server-Patches/Incremental-Auto-Saving.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Incremental-Auto-Saving.patch b/Spigot-Server-Patches/Incremental-Auto-Saving.patch index 580374817e..0e03fdd5d2 100644 --- a/Spigot-Server-Patches/Incremental-Auto-Saving.patch +++ b/Spigot-Server-Patches/Incremental-Auto-Saving.patch @@ -43,7 +43,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java