From a08d1e540d53dbb34c098047276a811b6feed8cd Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 13 Feb 2014 17:34:01 +1100 Subject: [PATCH] Set lastTick to prevent first few ticks from being too quick --- .../0097-Highly-Optimized-Tick-Loop.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CraftBukkit-Patches/0097-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0097-Highly-Optimized-Tick-Loop.patch index b8e1923b2..2d58266ff 100644 --- a/CraftBukkit-Patches/0097-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0097-Highly-Optimized-Tick-Loop.patch @@ -1,11 +1,11 @@ -From fefaf743d90b67d61c488d9c664aba1021049810 Mon Sep 17 00:00:00 2001 +From 30e1269996adb48b469645a79a15d32c4e4e9df8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 25 Jan 2014 14:08:35 +1100 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 -index 588ce0a..2f273ee 100644 +index 588ce0a..5a83c45 100644 --- a/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 @@ -41,7 +41,7 @@ index 588ce0a..2f273ee 100644 + // Spigot start + Arrays.fill( recentTps, 20 ); -+ long lastTick = 0, catchupTime = 0, curTime, wait, tickSection = System.nanoTime(); ++ long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick; while (this.isRunning) { - long k = ap(); - long l = k - i; @@ -96,7 +96,7 @@ index 588ce0a..2f273ee 100644 this.a((CrashReport) null); } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 049d88a..9b6243a 100755 +index eaafc2d..713b351 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -233,4 +233,9 @@ public class SpigotConfig @@ -161,5 +161,5 @@ index 0000000..2b8343d + } +} -- -1.8.4.msysgit.0 +1.8.3.2