aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2019-04-22 22:36:14 +0100
committerShane Freeder <[email protected]>2019-04-22 22:36:14 +0100
commitfb25dc17c62acce335346d5e96899257ae7230c7 (patch)
tree44f004622c605490512882661faf912f2f98a85c /Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch
parent10d58504f7d079381d1b0b189a1a8328a8e6ef51 (diff)
downloadPaper-fb25dc17c62acce335346d5e96899257ae7230c7.tar.gz
Paper-fb25dc17c62acce335346d5e96899257ae7230c7.zip
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: da08d022 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN 0cef14e4 Remove draft API from selectEntities CraftBukkit Changes: a46fdbc6 Remove outdated build delay. 3697519b SPIGOT-4708: Fix ExactChoice recipes neglecting material 9ead7009 SPIGOT-4677: Add minecraft.admin.command_feedback permission c3749a23 Remove the Damage tag from items when it is 0. f74c7b95 SPIGOT-4706: Can't interact with active item 494eef45 Mention requirement of JIRA ticket for bug fixes 51d62dec SPIGOT-4702: Exception when middle clicking certain slots be557e69 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
Diffstat (limited to 'Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch')
-rw-r--r--Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch b/Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch
new file mode 100644
index 0000000000..e3348db920
--- /dev/null
+++ b/Spigot-Server-Patches/0428-Don-t-update-entity-trackers-for-worlds-without-play.patch
@@ -0,0 +1,31 @@
+From efd33c3794e72cc40a77a3e58ecf90aec6efd6c2 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Sun, 24 Mar 2019 18:52:31 +0000
+Subject: [PATCH] Don't update entity trackers for worlds without players
+
+PlayerList#moveToWorld already untracks the player from the player list,
+meaning that we do not need to worry about this untracking players
+who've left the world, The server also untracks a player during
+disconnect, handing yet another case.
+
+If we don't need to untrack players who've left the world, it should be
+reasonably save to do this, as we're not going to be performing any
+server->client updates here, which is what this code is intended to do,
+and all players should be untracked.
+
+diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
+index ce39ea09e8..b93fccf919 100644
+--- a/src/main/java/net/minecraft/server/MinecraftServer.java
++++ b/src/main/java/net/minecraft/server/MinecraftServer.java
+@@ -1113,7 +1113,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
+
+ this.methodProfiler.exit();
+ this.methodProfiler.enter("tracker");
+- worldserver.getTracker().updatePlayers();
++ if (playerList.players.size() > 0) worldserver.getTracker().updatePlayers(); // Paper - No players, why spend time tracking them? (See patch)
+ this.methodProfiler.exit();
+ this.methodProfiler.exit();
+ worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
+--
+2.21.0
+