Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-21 05:50:05 +01:00
22 Zeilen
1.1 KiB
Diff
22 Zeilen
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 a469016c43251f16913a365c4131b2448eaa4c48..286b75a27103a084a9f9d79a90716ebcad65d813 100644
|
||
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||
|
@@ -606,7 +606,7 @@ public class ServerPlayer extends Player implements ContainerListener {
|
||
|
|
||
|
public void doTick() {
|
||
|
try {
|
||
|
- if (!this.isSpectator() || this.level.hasChunkAt(this.blockPosition())) {
|
||
|
+ if (valid && !this.isSpectator() || this.level.hasChunkAt(this.blockPosition())) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
|
||
|
super.tick();
|
||
|
}
|
||
|
|