From 25d6f61aed1dd52438e78f75a66e685adcbda7aa Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Mon, 11 Jan 2016 18:49:30 +0700 Subject: [PATCH] Autosave unmodified chunks only after 4 periods --- patches/net/minecraft/world/chunk/Chunk.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/net/minecraft/world/chunk/Chunk.java.patch b/patches/net/minecraft/world/chunk/Chunk.java.patch index 683d166..5ff7522 100644 --- a/patches/net/minecraft/world/chunk/Chunk.java.patch +++ b/patches/net/minecraft/world/chunk/Chunk.java.patch @@ -261,6 +261,15 @@ this.worldObj.unloadEntities(this.entityLists[i]); } MinecraftForge.EVENT_BUS.post(new ChunkEvent.Unload(this)); +@@ -1015,7 +1161,7 @@ + return true; + } + } +- else if (this.hasEntities && this.worldObj.getTotalWorldTime() >= this.lastSaveTime + 600L) ++ else if (this.hasEntities && this.worldObj.getTotalWorldTime() >= this.lastSaveTime + net.minecraft.server.MinecraftServer.getServer().autosavePeriod * 4) // PaperSpigot - Only save if we've passed 4 auto save intervals without modification + { + return true; + } @@ -1025,7 +1171,7 @@ public Random getRandomWithSeed(long p_76617_1_)