mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
fbf74ba0ac
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: f92c94517 SPIGOT-7310: PlayerToggleSneakEvent is not called when a player sneaks while riding an entity b5714184d SPIGOT-7316: Cancelling EntityUnmountEvent does not stop the all effects of the unmounting e237f8c88 SPIGOT-7312: Entity#setVisibleByDefault on player causes skin reset on this player client
22 lines
1.0 KiB
Diff
22 lines
1.0 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 9726ff668e252be8edf35ff3611ad0e774ca9aca..52ee3440b09b227bf1f488f374a0e282690f6ba4 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -681,7 +681,7 @@ public class ServerPlayer extends 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();
|
|
}
|
|
|