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

Paper Changes:
PaperMC/Paper@eb48ada Merge chunk task urgent executor thread into the worker queue
PaperMC/Paper@d9fb602 Expose vanilla BiomeProvider from WorldInfo (#7295)
PaperMC/Paper@7d7ae7b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7246)
2022-01-09 00:27:05 -06:00

32 lines
1.7 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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3c8119aa55aa1fcd59e8b0d545d474bd100c674e..3fcc8349d5afda0384e09641007b3731010a2d1d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1763,6 +1763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
this.setYHeadRot(yaw); // Paper - Update head rotation
+ if (valid && !this.isRemoved()) level.getChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); // CraftBukkit // Paper // Purpur
}
public void absMoveTo(double x, double y, double z) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 3ccac5096d83e21b19dd610a62f37ba21208dac6..8d2f0a07792d88c8f53c87333d32e67502b4e39f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2931,7 +2931,7 @@ public abstract class LivingEntity extends Entity {
}
}
- this.aiStep();
+ if (!this.isRemoved()) this.aiStep(); // Purpur
double d0 = this.getX() - this.xo;
double d1 = this.getZ() - this.zo;
float f = (float) (d0 * d0 + d1 * d1);