diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 13fab8a0fa..dc99c173d2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 07b31610596dc222d66d78b3b1e468314d3157e8 Mon Sep 17 00:00:00 2001 +From 0c34b70f8d3e5b2d85148ffae2ee45dd4f77763f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -6,10 +6,10 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 0000000000..c2d2614181 +index 0000000000..c6818bc86a --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java -@@ -0,0 +1,134 @@ +@@ -0,0 +1,135 @@ +package co.aikar.timings; + +import com.google.common.collect.MapMaker; @@ -24,6 +24,7 @@ index 0000000000..c2d2614181 +// TODO: Re-implement missing timers +public final class MinecraftTimings { + ++ public static final Timing serverOversleep = Timings.ofSafe("Server Oversleep"); + public static final Timing playerListTimer = Timings.ofSafe("Player List"); + public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions"); + public static final Timing connectionTimer = Timings.ofSafe("Connection Handler"); @@ -724,7 +725,7 @@ index 2b13f4c9f9..47379046dc 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cec3794cd4..bc0e483a2a 100644 +index cec3794cd4..c76f262db9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -736,6 +737,17 @@ index cec3794cd4..bc0e483a2a 100644 import org.spigotmc.SlackActivityAccountant; // Spigot public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { +@@ -128,8 +128,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcePackRepository; + @Nullable @@ -685,6 +685,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { - return !this.canSleepForTick(); +- return !this.canSleepForTick(); ++ return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick }); -@@ -962,7 +963,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { ++ return !this.canOversleep(); ++ }); ++ MinecraftTimings.serverOversleep.stopTiming(); ++ // Paper end this.slackActivityAccountant.tickStarted(); // Spigot long i = SystemUtils.getMonotonicNanos(); -@@ -983,14 +984,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -777,7 +816,7 @@ index cec3794cd4..bc0e483a2a 100644 } this.methodProfiler.enter("snooper"); -@@ -1013,30 +1012,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index 3f35a28b..cf00f35a 100644 +index 3f35a28ba1..cf00f35a5b 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -70,7 +70,7 @@ public class EULA { @@ -19,10 +19,10 @@ index 3f35a28b..cf00f35a 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bc0e483a..d7c00066 100644 +index c76f262db9..11048c37f1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1301,7 +1301,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -123,10 +123,10 @@ index cdd8939504..bd6a0bd16b 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6594138f35..55d10058f5 100644 +index 64c961e5b5..f56edde789 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1145,6 +1145,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener @@ -32,10 +32,10 @@ index ef392f5fe8..227fe073fd 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 55d10058f5..fe50d4ff71 100644 +index f56edde789..34be67417d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1111,6 +1111,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e3bd80c934..17b9e9a31d 100644 +index b4eb53f28a..fbad6a31c1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot @@ -25,7 +25,7 @@ index e3bd80c934..17b9e9a31d 100644 this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); this.ai = new CraftingManager(); this.aj = new TagRegistry(); -@@ -2123,7 +2125,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 9 Jun 2017 19:03:43 +0200 Subject: [PATCH] Use TerminalConsoleAppender for console improvements @@ -185,7 +185,7 @@ index 895049287c..92d0aa6d66 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f621350ea6..8fcffc9fa3 100644 +index 759c713976..6c9a43d66b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate; @@ -234,7 +234,7 @@ index f621350ea6..8fcffc9fa3 100644 } catch (Exception ignored) { } // CraftBukkit end -@@ -1429,7 +1433,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -- -2.22.0 +2.22.1 diff --git a/Spigot-Server-Patches/0159-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0159-Basic-PlayerProfile-API.patch index 20a3023c1f..825f61411e 100644 --- a/Spigot-Server-Patches/0159-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0159-Basic-PlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 0009ced384917a226d1a1694eab6b1d8f1241678 Mon Sep 17 00:00:00 2001 +From de22020424bc3d2831d68f812df2172635cc433b Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 15 Jan 2018 22:11:48 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -429,10 +429,10 @@ index 1f6a126329..6d278a0da5 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8fcffc9fa3..32a9e54d0a 100644 +index 6c9a43d66b..6e6c662f95 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1260,7 +1260,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -177,7 +177,7 @@ index 0000000000..a85466bc7e + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 32a9e54d0a..37353b29da 100644 +index 6e6c662f95..8d2be704f9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,6 +1,9 @@ @@ -190,7 +190,7 @@ index 32a9e54d0a..37353b29da 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.gson.JsonElement; -@@ -1058,7 +1061,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { this.Z = i; this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); @@ -261,5 +261,5 @@ index 783aa6db1f..33767c85ca 100644 } -- -2.22.0 +2.22.1 diff --git a/Spigot-Server-Patches/0288-Optimize-Hoppers.patch b/Spigot-Server-Patches/0288-Optimize-Hoppers.patch index 98256a7a4d..6d26637731 100644 --- a/Spigot-Server-Patches/0288-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0288-Optimize-Hoppers.patch @@ -1,4 +1,4 @@ -From 57e4e704f0bd0d50d54eb66b0050a85a0e7ca8a6 Mon Sep 17 00:00:00 2001 +From 940cf3172b52e2988e9f34921ce7cca05de151aa Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Optimize Hoppers @@ -47,10 +47,10 @@ index c69a067ef1..1e23d77e72 100644 itemstack.d(this.C()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2acb71fa8a..0d690fc8e1 100644 +index 6f410ca921..c075780674 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1143,6 +1143,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper @@ -299,5 +299,5 @@ index 1ba98bf736..6f6519f6c5 100644 flag = true; } else if (a(itemstack1, itemstack)) { -- -2.22.0 +2.22.1 diff --git a/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch index 6e288a01b7..e9cff2e107 100644 --- a/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch @@ -1,4 +1,4 @@ -From 7d5f5c45416e21cfe63aa30f352310a28faee015 Mon Sep 17 00:00:00 2001 +From 1fd27d18045b686f8e5af4caf00cce897e9fb136 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a5447c6501..aec871dd24 100644 +index 40260dbd48..a7b63ab421 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1130,12 +1130,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 27 Mar 2019 22:48:45 -0400 Subject: [PATCH] Server Tick Events @@ -6,18 +6,18 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aec871dd24..35c5d38c21 100644 +index a7b63ab421..24dccfb7a1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1055,6 +1055,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 13 May 2019 21:10:59 -0700 Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 35c5d38c2..c70ab3caf 100644 +index 24dccfb7a1..ee02001700 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2154,7 +2154,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 9 Jun 2019 03:53:22 +0100 Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index de11a91af..4d3c6c6b4 100644 +index de11a91af6..4d3c6c6b47 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -489,4 +489,19 @@ public class PaperWorldConfig { @@ -29,7 +29,7 @@ index de11a91af..4d3c6c6b4 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ee8f80174..2003522d9 100644 +index ee8f801745..2003522d96 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ index ee8f80174..2003522d9 100644 private long t; @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 162700313..535c2258b 100644 +index 1627003134..535c2258b9 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -62,7 +62,7 @@ index 162700313..535c2258b 100644 public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c58f6f50d..229336040 100644 +index 098b3e5355..ccf359dff1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -165,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 493770bf6..2be6fa0f0 100644 +index 493770bf68..2be6fa0f07 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -297,6 +297,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -147,7 +147,7 @@ index 493770bf6..2be6fa0f0 100644 if (flag) { List list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList()); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8a3124fed..e4cc24806 100644 +index 8a3124fed4..e4cc24806e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -756,11 +756,44 @@ public class WorldServer extends World { @@ -197,5 +197,5 @@ index 8a3124fed..e4cc24806 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); -- -2.23.0 +2.22.1