From bb418b5532c9a14707536bbc13b54c7399256c80 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 6 May 2020 21:24:43 -0400 Subject: [PATCH] Move delayed init down later in tick, improve accuracy of startup time Now tracks the full startup time for "Done" message at end, as apparently Vanillas was done in a place that skipped tracking a lot of code too. This fixes an issue with ViaVersion --- .../Improved-Watchdog-Support.patch | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Spigot-Server-Patches/Improved-Watchdog-Support.patch b/Spigot-Server-Patches/Improved-Watchdog-Support.patch index 6a76c1ca7f..4248ef5b31 100644 --- a/Spigot-Server-Patches/Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/Improved-Watchdog-Support.patch @@ -56,6 +56,15 @@ diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java +@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + long l = SystemUtils.getMonotonicNanos() - i; + String s2 = String.format(Locale.ROOT, "%.3fs", (double) l / 1.0E9D); + +- DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s2); ++ //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s2); // Paper moved to after init + if (dedicatedserverproperties.announcePlayerAchievements != null) { + ((GameRules.GameRuleBoolean) this.getGameRules().get(GameRules.ANNOUNCE_ADVANCEMENTS)).a(dedicatedserverproperties.announcePlayerAchievements, (MinecraftServer) this); + } @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @Override public void stop() { @@ -98,14 +107,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant