2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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
2022-06-08 04:22:42 +00:00
index 4c0ab7705824a02bb7e9906fbd3a5c4792bc7dd7..25cbb75767331682276f3c1abd6a08bbc81b4e13 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2022-06-08 04:22:42 +00:00
@@ -650,7 +650,7 @@ public class ServerPlayer extends Player {
2021-06-11 12:02:28 +00:00
public void doTick() {
try {
2021-06-13 22:05:18 +00:00
- 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)
2021-06-11 12:02:28 +00:00
super.tick();
}