2020-05-06 09:48:49 +00:00
From 0000000000000000000000000000000000000000 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-09-10 23:47:58 +00:00
index 4bf0c25bc258f01fe05a48f3e879a1c5b7d1d8ee..dfef674d64a0d7e546e6360b134699074a7e39b0 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-08-25 02:22:08 +00:00
@@ -473,7 +473,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
2020-04-02 21:19:44 +00:00
public void playerTick() {
try {
2020-06-26 01:53:21 +00:00
- if (!this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) {
+ if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
2020-04-02 21:19:44 +00:00
super.tick();
}