mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
22 lines
1.1 KiB
Diff
22 lines
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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index 59f5ef6e14b738a408dc8462ba99605ec1ae82e9..52b5c47452a46cd6e61e1dd7c135620e36472c73 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -472,7 +472,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();
|
|
}
|
|
|