mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-15 07:05:44 +01:00
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
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 e60dac038e8a414a45f8dab465d722ee3fb5ef54..cfccab0b33dfa387fdab09ad51d518d42b1b5775 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -480,7 +480,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();
|
|
}
|
|
|