Reapply tick loop patch.
Dieser Commit ist enthalten in:
Ursprung
13c46dd878
Commit
2367cf0a3d
@ -1,14 +1,14 @@
|
|||||||
From 00045f375cae8ca1e74ef10254c6827b095ecdb3 Mon Sep 17 00:00:00 2001
|
From 152b956a0d94edd3c7384e084e174f69f53238d9 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 3 Feb 2013 12:28:17 +1100
|
Date: Wed, 22 Jan 2014 19:14:15 +1100
|
||||||
Subject: [PATCH] Highly Optimized Tick Loop
|
Subject: [PATCH] Highly Optimized Tick Loop
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 6a01982..0966b4b 100644
|
index 6a01982..7dabffb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -101,6 +101,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -101,6 +101,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||||
public int autosavePeriod;
|
public int autosavePeriod;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -16,23 +16,17 @@ index 6a01982..0966b4b 100644
|
|||||||
+ private static final int TPS = 20;
|
+ private static final int TPS = 20;
|
||||||
+ private static final int TICK_TIME = 1000000000 / TPS;
|
+ private static final int TICK_TIME = 1000000000 / TPS;
|
||||||
+ public static double currentTPS = 0;
|
+ public static double currentTPS = 0;
|
||||||
+ private static long catchupTime = 0;
|
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
|
||||||
public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet
|
public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet
|
||||||
i = this;
|
i = this;
|
||||||
@@ -422,45 +428,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -429,38 +434,25 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
public void run() {
|
this.p.setServerInfo(new ServerPingServerData("1.7.2", 4));
|
||||||
try {
|
this.a(this.p);
|
||||||
if (this.init()) {
|
|
||||||
- long i = ap();
|
+ // Spigot start
|
||||||
- long j = 0L;
|
+ long lastTick = 0, catchupTime = 0, curTime, wait;
|
||||||
-
|
while (this.isRunning) {
|
||||||
- this.p.setMOTD(new ChatComponentText(this.motd));
|
|
||||||
- this.p.setServerInfo(new ServerPingServerData("1.7.2", 4));
|
|
||||||
- this.a(this.p);
|
|
||||||
-
|
|
||||||
- while (this.isRunning) {
|
|
||||||
- long k = ap();
|
- long k = ap();
|
||||||
- long l = k - i;
|
- long l = k - i;
|
||||||
-
|
-
|
||||||
@ -53,10 +47,8 @@ index 6a01982..0966b4b 100644
|
|||||||
- if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
|
- if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
|
||||||
- this.t();
|
- this.t();
|
||||||
- j = 0L;
|
- j = 0L;
|
||||||
+ // Spigot start
|
+ curTime = System.nanoTime();
|
||||||
+ for (long lastTick = 0L; this.isRunning;) {
|
+ wait = TICK_TIME - (curTime - lastTick) - catchupTime;
|
||||||
+ long curTime = System.nanoTime();
|
|
||||||
+ long wait = TICK_TIME - (curTime - lastTick) - catchupTime;
|
|
||||||
+ if (wait > 0) {
|
+ if (wait > 0) {
|
||||||
+ Thread.sleep(wait / 1000000);
|
+ Thread.sleep(wait / 1000000);
|
||||||
+ catchupTime = 0;
|
+ catchupTime = 0;
|
||||||
@ -67,15 +59,15 @@ index 6a01982..0966b4b 100644
|
|||||||
- j -= 50L;
|
- j -= 50L;
|
||||||
- this.t();
|
- this.t();
|
||||||
- }
|
- }
|
||||||
+ catchupTime = Math.min(TICK_TIME * TPS, Math.abs(wait));
|
+ catchupTime = Math.min(1000000000, Math.abs(wait));
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
- Thread.sleep(1L);
|
- Thread.sleep(1L);
|
||||||
- this.N = true;
|
|
||||||
+ currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
+ currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
||||||
+ lastTick = curTime;
|
+ lastTick = curTime;
|
||||||
+ MinecraftServer.currentTick++;
|
+ MinecraftServer.currentTick++;
|
||||||
+ this.t();
|
+ this.t();
|
||||||
|
this.N = true;
|
||||||
}
|
}
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 67aa884a8f52483111b5a4e2c3327d4163750602 Mon Sep 17 00:00:00 2001
|
From 98e68a83a33a2f4152c4afe7eeae5450739829bc Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||||
Subject: [PATCH] Improved Timings System
|
Subject: [PATCH] Improved Timings System
|
||||||
@ -64,7 +64,7 @@ index dc0abc5..3d6aeff 100644
|
|||||||
|
|
||||||
protected String H() {
|
protected String H() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 0966b4b..d740620 100644
|
index 7dabffb..59f6831 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -10,7 +10,6 @@ import java.util.ArrayList;
|
@@ -10,7 +10,6 @@ import java.util.ArrayList;
|
||||||
@ -83,18 +83,19 @@ index 0966b4b..d740620 100644
|
|||||||
import org.bukkit.craftbukkit.util.Waitable;
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
import org.bukkit.event.world.WorldSaveEvent;
|
import org.bukkit.event.world.WorldSaveEvent;
|
||||||
@@ -442,7 +442,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -449,8 +449,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
||||||
lastTick = curTime;
|
lastTick = curTime;
|
||||||
MinecraftServer.currentTick++;
|
MinecraftServer.currentTick++;
|
||||||
+ SpigotTimings.serverTickTimer.startTiming();
|
+ SpigotTimings.serverTickTimer.startTiming();
|
||||||
this.t();
|
this.t();
|
||||||
|
this.N = true;
|
||||||
+ SpigotTimings.serverTickTimer.stopTiming();
|
+ SpigotTimings.serverTickTimer.stopTiming();
|
||||||
+ org.spigotmc.CustomTimingsHandler.tick();
|
+ org.spigotmc.CustomTimingsHandler.tick();
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
} else {
|
} else {
|
||||||
@@ -567,6 +570,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -575,6 +578,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
public void u() {
|
public void u() {
|
||||||
this.methodProfiler.a("levels");
|
this.methodProfiler.a("levels");
|
||||||
|
|
||||||
@ -102,7 +103,7 @@ index 0966b4b..d740620 100644
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
this.server.getScheduler().mainThreadHeartbeat(this.ticks);
|
this.server.getScheduler().mainThreadHeartbeat(this.ticks);
|
||||||
|
|
||||||
@@ -575,7 +579,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -583,7 +587,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
processQueue.remove().run();
|
processQueue.remove().run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +114,7 @@ index 0966b4b..d740620 100644
|
|||||||
|
|
||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
if (this.ticks % 20 == 0) {
|
if (this.ticks % 20 == 0) {
|
||||||
@@ -627,7 +634,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -635,7 +642,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.a("tracker");
|
this.methodProfiler.a("tracker");
|
||||||
@ -123,7 +124,7 @@ index 0966b4b..d740620 100644
|
|||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
// } // CraftBukkit
|
// } // CraftBukkit
|
||||||
@@ -636,14 +645,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -644,14 +653,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
}
|
}
|
||||||
|
|
||||||
this.methodProfiler.c("connection");
|
this.methodProfiler.c("connection");
|
||||||
@ -300,7 +301,7 @@ index 00c2a18..f1bf467 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 9f09a3d..74a2d45 100644
|
index a0e4ade..9672508 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -184,10 +184,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
@@ -184,10 +184,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 438d4bd728376285ad5aeaec80c5d3847d5fedd4 Mon Sep 17 00:00:00 2001
|
From 0783a86b0d7014214d1610a6e3372b143ba38909 Mon Sep 17 00:00:00 2001
|
||||||
From: agentk20 <agentkid20@gmail.com>
|
From: agentk20 <agentkid20@gmail.com>
|
||||||
Date: Sat, 3 Aug 2013 19:28:48 +1000
|
Date: Sat, 3 Aug 2013 19:28:48 +1000
|
||||||
Subject: [PATCH] Fully Disable Snooper When Not Required
|
Subject: [PATCH] Fully Disable Snooper When Not Required
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index d740620..cfb7922 100644
|
index 59f6831..0e0de44 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -555,11 +555,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -563,11 +563,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
this.f[this.ticks % 100] = System.nanoTime() - i;
|
this.f[this.ticks % 100] = System.nanoTime() - i;
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.a("snooper");
|
this.methodProfiler.a("snooper");
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
From 04ebf9dffc8583903b7c28bf511e007c109d1a04 Mon Sep 17 00:00:00 2001
|
From e33c3e986cae74b9cb85dd3488de76556bda8272 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 23 Feb 2013 12:33:20 +1100
|
Date: Sat, 23 Feb 2013 12:33:20 +1100
|
||||||
Subject: [PATCH] Watchdog Thread.
|
Subject: [PATCH] Watchdog Thread.
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index cfb7922..1f057b1 100644
|
index 0e0de44..a55160f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -446,6 +446,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -454,6 +454,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
this.t();
|
this.N = true;
|
||||||
SpigotTimings.serverTickTimer.stopTiming();
|
SpigotTimings.serverTickTimer.stopTiming();
|
||||||
org.spigotmc.CustomTimingsHandler.tick();
|
org.spigotmc.CustomTimingsHandler.tick();
|
||||||
+ org.spigotmc.WatchdogThread.tick();
|
+ org.spigotmc.WatchdogThread.tick();
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
} else {
|
} else {
|
||||||
@@ -472,6 +473,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -480,6 +481,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
this.a(crashreport);
|
this.a(crashreport);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f90fa8326368b3ccd386b6a12ba643f0e8e34fcd Mon Sep 17 00:00:00 2001
|
From a9ac8accb027efbd0292d9d4e185a3c017c40054 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Fri, 13 Dec 2013 11:58:58 +1100
|
Date: Fri, 13 Dec 2013 11:58:58 +1100
|
||||||
Subject: [PATCH] Configurable Amount of Netty Threads
|
Subject: [PATCH] Configurable Amount of Netty Threads
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Amount of Netty Threads
|
|||||||
This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance.
|
This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 1f057b1..eee0119 100644
|
index a55160f..ccf7abd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -51,7 +51,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -51,7 +51,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
@ -18,7 +18,7 @@ index 1f057b1..eee0119 100644
|
|||||||
private final ServerPing p = new ServerPing();
|
private final ServerPing p = new ServerPing();
|
||||||
private final Random q = new Random();
|
private final Random q = new Random();
|
||||||
private String serverIp;
|
private String serverIp;
|
||||||
@@ -112,7 +112,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -111,7 +111,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
i = this;
|
i = this;
|
||||||
this.c = proxy;
|
this.c = proxy;
|
||||||
// this.universe = file1; // CraftBukkit
|
// this.universe = file1; // CraftBukkit
|
||||||
@ -27,7 +27,7 @@ index 1f057b1..eee0119 100644
|
|||||||
this.n = new CommandDispatcher();
|
this.n = new CommandDispatcher();
|
||||||
// this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init
|
// this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init
|
||||||
this.S = (new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString())).createMinecraftSessionService();
|
this.S = (new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||||
@@ -1211,7 +1211,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -1219,7 +1219,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerConnection ag() {
|
public ServerConnection ag() {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 832ac75e2e0fc5371db065ebd237e61646ac636e Mon Sep 17 00:00:00 2001
|
From 96112e90b66c38f472a93f5c133af24d6c87a69f Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 18 Dec 2013 13:39:14 +1100
|
Date: Wed, 18 Dec 2013 13:39:14 +1100
|
||||||
Subject: [PATCH] Log Cause of Unexpected Exceptions
|
Subject: [PATCH] Log Cause of Unexpected Exceptions
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index eee0119..868061b 100644
|
index ccf7abd..6410f32 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -454,6 +454,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -462,6 +462,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
}
|
}
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
h.error("Encountered an unexpected exception", throwable);
|
h.error("Encountered an unexpected exception", throwable);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 0373bc1b64bf816402795a7b14f73805a2084c99 Mon Sep 17 00:00:00 2001
|
From 021a758c0089cfe0111815a7053e0a4dcfac17b7 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 12 Jan 2014 20:56:41 +1100
|
Date: Sun, 12 Jan 2014 20:56:41 +1100
|
||||||
Subject: [PATCH] Try and Debug Crash Reports Crashing
|
Subject: [PATCH] Try and Debug Crash Reports Crashing
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 868061b..c58c73e 100644
|
index 6410f32..6fd430f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -627,7 +627,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -635,7 +635,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
try {
|
try {
|
||||||
worldserver.doTick();
|
worldserver.doTick();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@ -22,7 +22,7 @@ index 868061b..c58c73e 100644
|
|||||||
worldserver.a(crashreport);
|
worldserver.a(crashreport);
|
||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
@@ -635,7 +641,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -643,7 +649,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
try {
|
try {
|
||||||
worldserver.tickEntities();
|
worldserver.tickEntities();
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
@ -37,5 +37,5 @@ index 868061b..c58c73e 100644
|
|||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
1.8.4.msysgit.0
|
1.8.3.2
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e4ad495ac44e88b0cabbe3d51098af3f5e125ba7 Mon Sep 17 00:00:00 2001
|
From 6e38905c8bd6d8ead1e76ca8581d1842f26ae583 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 12 Jan 2014 21:07:18 +1100
|
Date: Sun, 12 Jan 2014 21:07:18 +1100
|
||||||
Subject: [PATCH] Replace AutoSave Mechanism
|
Subject: [PATCH] Replace AutoSave Mechanism
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Replace AutoSave Mechanism
|
|||||||
The problem here is that MinecraftServer.save(..), will attempt to sleep whilst all pending chunks are written to disk, however due to various and complicated bugs, it will wait for an incorrect amount of chunks, which may cause it to sleep for an overly long amount of time. Instead we will mimic the save-all command in its behaviour, which is both safe and performant.
|
The problem here is that MinecraftServer.save(..), will attempt to sleep whilst all pending chunks are written to disk, however due to various and complicated bugs, it will wait for an incorrect amount of chunks, which may cause it to sleep for an overly long amount of time. Instead we will mimic the save-all command in its behaviour, which is both safe and performant.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index c58c73e..c158e8a 100644
|
index 6fd430f..1225411 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -555,7 +555,16 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
@@ -563,7 +563,16 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||||
if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit
|
if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit
|
||||||
this.methodProfiler.a("save");
|
this.methodProfiler.a("save");
|
||||||
this.t.savePlayers();
|
this.t.savePlayers();
|
||||||
@ -28,5 +28,5 @@ index c58c73e..c158e8a 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
1.8.4.msysgit.0
|
1.8.3.2
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren