Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
b4e629a283
Use the distance map to find candidate players for tracking. This also ports a few utility changes from Tuinity
25 Zeilen
1.0 KiB
Diff
25 Zeilen
1.0 KiB
Diff
From c0c34e10d92aefb26116f3c7865b54debcd31ba7 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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index 900631ebe0..aa9c903aa8 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -429,7 +429,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
public void playerTick() {
|
|
try {
|
|
- if (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this))) {
|
|
+ if (valid && (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this)))) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
|
|
super.tick();
|
|
}
|
|
|
|
--
|
|
2.26.0
|
|
|