mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 09:23:42 +01:00
345a6a6205
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: ef0946409 PR-1091: Fix exit position in entity travel with portals d12768f75 PR-1090: Remove no longer needed world reference from CraftMerchantCustom 7550f6854 SPIGOT-7115: Support hex color codes in custom merchant inventory titles
21 lines
1 KiB
Diff
21 lines
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 d777fa8dd3529faf14bf82d023e00e9a118b45e5..6469472fedd9f28a3d609714ddf7255824a7f72a 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -651,7 +651,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();
|
|
}
|
|
|