diff options
Diffstat (limited to 'patches/unapplied/server/0370-Don-t-tick-dead-players.patch')
-rw-r--r-- | patches/unapplied/server/0370-Don-t-tick-dead-players.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/unapplied/server/0370-Don-t-tick-dead-players.patch b/patches/unapplied/server/0370-Don-t-tick-dead-players.patch new file mode 100644 index 0000000000..4a700e795a --- /dev/null +++ b/patches/unapplied/server/0370-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 421be41fc09d53b50c08e74f9c32a198e90a2c7c..e6945abd9337af07625793fb893718b00e67168a 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -683,7 +683,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(); + } + |