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

Paper Changes:
PaperMC/Paper@2033dba Updated Upstream (CraftBukkit)
PaperMC/Paper@a3ad720 Remove ChatColor usages (#7543)
PaperMC/Paper@8fc0999 Fix some nullability things (#7275)
PaperMC/Paper@fd069dd Remove incorrect throws javadoc in Team (#7869)
PaperMC/Paper@bed5cb2 Limit resolved selectors when enabled
PaperMC/Paper@4d83ed0 [ci skip] Changing the order of the rebase with autosquash command in the contributing.md (#6974)
PaperMC/Paper@071a4a2 throw exception if worlds are created while being ticked (#7653)
PaperMC/Paper@5b6397a Make leave messages for kicks the same as for quitting (#7874)
PaperMC/Paper@5befb55 Updated Upstream (Bukkit/CraftBukkit) (#7875)
PaperMC/Paper@b3deb25 Move some methods to RegionAccessor (#7635)
PaperMC/Paper@d8ef841 [DataConverter] Fix generator options parsing
PaperMC/Paper@4b27254 Fix treasure maps discovered settings (#7627)
PaperMC/Paper@276d830 Fix campfire walker in V1920

Pufferfish Changes:
pufferfish-gg/Pufferfish@671d68b Add Entity TTLs
pufferfish-gg/Pufferfish@aaca13d Updated Upstream (Paper)
2022-06-07 13:09:12 -04: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 19756aac2e13914d0cf3cabed3621d2a4228330b..f44b29dd23bdc1974300e90501331383f639756d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1782,6 +1782,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
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 5b07633ce5d001ee25766b88e90cc3f1d4508ff0..5fd3b3cf20b31a9baaf5a703aab62bb5161001b4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2942,7 +2942,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);