0
0
mirror of https://github.com/PaperMC/Paper.git synced 2024-11-22 04:56:29 +00:00
Paper/patches/server/0329-Don-t-tick-dead-players.patch
Owen1212055 af125d26a9
Patch
2024-10-23 10:04:01 -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/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ea8279637a2af4d18c9decbf3342b058edeffd73..965ca28a8877f5e541741c45bace7075d15a77d7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -993,7 +993,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.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();
}