Paper/Spigot-Server-Patches/0430-Don-t-tick-dead-players.patch
Aikar 1ab021ddca Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent

CraftBukkit Changes:
927200a9 #718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
2020-08-31 08:30:51 -04:00

22 lines
1.1 KiB
Diff

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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index d2a5491116cbe81de97e7f7c87f4409e7ac451c6..62fef5579b689a6cfe0679764ea22803e0d35388 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -473,7 +473,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void playerTick() {
try {
- 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)
super.tick();
}