Files
Purpur/patches/server/0096-Fix-the-dead-lagging-the-server.patch
William Blake Galbreath 193c511fce Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
a4f066cc Fix method profiler inbalance introduced in a2a9ffe (#3132)
c65dcad3 Don't delay chunk unloads during entity ticking
bc17ce69 Delay unsafe actions until after entity ticking is done - Fixes #3114
5553e6b3 Disable Sync Events firing Async errors during shutdown
e12c51d9 Use better variable for isStopping() API
586ee2bb Remove patch for MC-111480, fixed in 1.14
09a94215 Remove streams from Mob AI System
bb5c294e Fix Disabling Asynchronous Chunks
089d8356 Implement Chunk Priority / Urgency System for World Gen
fce69af7 Use dedicated thread for main thread blocking chunk loads
588b62e4 Add tick times API and /mspt command (#3102)
11de41c7 Add API MinecraftServer#isStopping (#3129)
942ff3c2 My patches are under MIT (#3130)
2020-04-12 03:45:54 -05:00

40 lines
1.8 KiB
Diff

From 078dd0a43d122985c30e849bb195a1d1cf0d1054 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
---
src/main/java/net/minecraft/server/Entity.java | 2 +-
src/main/java/net/minecraft/server/EntityLiving.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6c3d5cdab3..61b931e6bf 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1355,7 +1355,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;
- world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
+ if (!dead) world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit // Purpur
}
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0405393f32..2769077bb4 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2385,7 +2385,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);
--
2.24.0