2020-05-06 09:22:03 +00:00
From 61c81d1c8c5796bd292b9e00b82bbceb6d7fcbb3 Mon Sep 17 00:00:00 2001
2020-04-02 21:19:44 +00:00
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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
2020-05-06 09:22:03 +00:00
index 900631ebe05..aa9c903aa82 100644
2020-04-02 21:19:44 +00:00
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
2020-05-06 07:44:47 +00:00
@@ -429,7 +429,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
2020-04-02 21:19:44 +00:00
public void playerTick() {
try {
- if (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this))) {
+ if (valid && (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this)))) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
super.tick();
}
--
2020-05-06 09:22:03 +00:00
2.26.2
2020-04-02 21:19:44 +00:00