Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +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/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||
|
index c0e32b13e79fa6b34ac9448d2f74339bb771274f..e3721287cc18c8df81d1353084364966eb3f55ab 100644
|
||
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||
|
@@ -609,7 +609,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||
|
|
||
|
public void playerTick() {
|
||
|
try {
|
||
|
- if (!this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) {
|
||
|
+ if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
|
||
|
super.tick();
|
||
|
}
|
||
|
|