Files
Purpur/patches/server/0052-Fix-the-dead-lagging-the-server.patch
BillyGalbreath e53522571d Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
808bd9198 Add fast alternative constructor for Vector3f (#5339)
e849c51da fix #5336
0b25bacfc fix patch 'Remove streams from SensorNearest' (fixes #5330)
4d287e31c Use Adventure for `/version` command feedback, add copy to clipboard click event (#5333)

Tuinity Changes:
5b6d8beec: Update Upstream (Paper)
81d5fc1dd: Fix NPE in pickup logic for arrow
19ac6608f: Move region chunk unload & poi unload hook up
38ad5a1bd: Do not run close logic for inventories on chunk load
fb75a6f83: Do not allow the server to unload chunks at request of plugins
f87cb795f: Make entity tracker use highest range of passengers
71b089f18: Do not run raytrace logic for AIR
09e1a1036: Fix NPE in light exception handler
0ae7c2c23: Dump even more info for ticking entities
2e4a930c4: Store changed positions inside field on light engine
7734ef0a9: Detail player ticking in watchdog dumps
2021-03-11 15:01:23 -06:00

32 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 6 Mar 2020 13:37:26 -0600
Subject: [PATCH] Fix the dead lagging the server
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4edb489012ddc9454e412f06acc4587a3572c8d3..05902a6e9b1dd326776cac3bd70c438f9e83da26 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1536,6 +1536,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
this.lastYaw = this.yaw;
this.lastPitch = this.pitch;
+ if (valid && !dead) world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit // Paper // Purpur
}
public void f(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 1dddf80e11db54a666de8c3b0d7a5c8a5f1f93ab..b273b021b0e3484a3189c3d6d55284b3c45a41ad 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2500,7 +2500,7 @@ public abstract class EntityLiving extends Entity {
}
}
- this.movementTick();
+ if (!dead) this.movementTick(); // Purpur
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);