aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0373-Don-t-tick-dead-players.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0373-Don-t-tick-dead-players.patch')
-rw-r--r--patches/server/0373-Don-t-tick-dead-players.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/server/0373-Don-t-tick-dead-players.patch b/patches/server/0373-Don-t-tick-dead-players.patch
new file mode 100644
index 0000000000..b5386f7c8d
--- /dev/null
+++ b/patches/server/0373-Don-t-tick-dead-players.patch
@@ -0,0 +1,21 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Thu, 2 Apr 2020 17:16:48 -0400
+Subject: [PATCH] Don't tick dead players
+
+Causes sync chunk loads and who knows what all else.
+This is safe because Spectators are skipped in unloaded chunks too in vanilla.
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+index db351747830079d13cabd0010e8906a5e5aa4e96..8e4dff97dba9f8e1395113bed8f91b0cbb70b354 100644
+--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+@@ -653,7 +653,7 @@ public class ServerPlayer extends Player {
+
+ public void doTick() {
+ try {
+- if (!this.isSpectator() || !this.touchingUnloadedChunk()) {
++ if (valid && !this.isSpectator() || !this.touchingUnloadedChunk()) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
+ super.tick();
+ }
+