Update PaperSpigot to Minecraft 1.8
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 19 Oct 2014 16:30:48 -0500
|
||||
Date: Fri, 28 Nov 2014 13:47:24 -0600
|
||||
Subject: [PATCH] Improve autosave mechanism
|
||||
|
||||
Only save modified chunks, or chunks with entities after 4 auto save passes
|
||||
@@ -10,11 +10,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
if (this.o && this.world.getTime() != this.lastSaved || this.n) {
|
||||
if (this.r && this.world.getTime() != this.lastSaved || this.q) {
|
||||
return true;
|
||||
}
|
||||
- } else if (this.o && this.world.getTime() >= this.lastSaved + 600L) {
|
||||
+ } else if (this.o && this.world.getTime() >= this.lastSaved + MinecraftServer.getServer().autosavePeriod * 4) { // PaperSpigot - Only save if we've passed 2 auto save intervals without modification
|
||||
- } else if (this.r && this.world.getTime() >= this.lastSaved + 600L) {
|
||||
+ } else if (this.r && this.world.getTime() >= + MinecraftServer.getServer().autosavePeriod * 4) { // PaperSpigot - Only save if we've passed 2 auto save intervals without modification
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
||||
// 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
|
||||
@@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
world.savingDisabled = false;
|
||||
- world.save(true, null);
|
||||
+ world.save(forceSave, null); // PaperSpigot
|
||||
+ world.save(forceSave, null);
|
||||
|
||||
world.savingDisabled = oldSave;
|
||||
} catch (ExceptionWorldConflict ex) {
|
||||
|
||||
Reference in New Issue
Block a user