Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
72e87abc2d
Co-authored-by: Paul Sauve <paul@technove.co>
22 Zeilen
1.0 KiB
Diff
22 Zeilen
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 60564b0624eb253443831e1ba1c3f3dcade6b8ef..8be5973f90c7c6959e572072951d61f65f0cd2f3 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -724,7 +724,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();
|
|
}
|
|
|