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

Paper Changes:
PaperMC/Paper@f7e3976 Revert "Legacy data should look for legacy materials (Fixes #6618)" (Fixes #6664)
PaperMC/Paper@ce1e7e8 Fix jline relocation (#6677)
PaperMC/Paper@3e8fb21 Suggest PlayerPostRespawnEvent if changing player state (#6679)
PaperMC/Paper@2b404b0 Fix nullability on Block#breakNaturally (#6651)
PaperMC/Paper@8ee9bdd Fix stacktrace deobf where thrownProxy got initialized before rewriting (#6684)
PaperMC/Paper@fce7905 Option to prevent NBT copy in smithing recipes (#6671)
PaperMC/Paper@3b2b835 Fix click event when vanilla scoreboard name coloring is enabled (#6652)
PaperMC/Paper@425edfa More CommandBlock API (#5746)
PaperMC/Paper@6847f57 Improve ItemStack#editMeta (#6502)
PaperMC/Paper@6703c13 Preserve overstacked loot (#5943)
PaperMC/Paper@0032236 Make Levels Use Correct Spawn Settings (#6419)
PaperMC/Paper@4a27a4a Update head rotation in missing places (#5481)
PaperMC/Paper@ebfd70b Use null for null resource pack prompts (#6572)
PaperMC/Paper@826acaf Fix plugin provides load order (#6687)
PaperMC/Paper@f905057 Prevent unintended light block manipulation (#6601)
PaperMC/Paper@45c4f90 Readd root/admin user detection (#6593)
PaperMC/Paper@e8830b2 Revert "Readd root/admin user detection (#6593)" (#6699)
PaperMC/Paper@cc38c16 Updated Upstream (Bukkit/CraftBukkit) (#6638)
PaperMC/Paper@7dd7c0c [ci skip] update issue template to remove checkboxes and add datapacks (#6702)
PaperMC/Paper@bde7b98 Make legacyRenderer a ViewerUnaware renderer (#6691)
PaperMC/Paper@e391591 Update paperweight to 1.1.12 (#6653)
PaperMC/Paper@e14aff9 Don't count named piglins and hoglins towards mob cap (#6452)
PaperMC/Paper@a978f41 Start console thread after PaperConfig & MinecraftServer.console are initialized (#6716)
PaperMC/Paper@b1f0cbd [ci skip] Remove redundant/broken readme badges (#6715)
PaperMC/Paper@e3ef498 [ci skip] remove markdown from issue template (#6705)
PaperMC/Paper@7ebf08a Handle missing Spawn Egg item meta for 1.17 mobs (#6700)
PaperMC/Paper@90f717f Add missing team sidebar display slots (#6690)
2021-10-04 15:11:25 -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 c2820fd6502b49ad33e0947339a703335bceb30c..aac2d74c588e78b6873e2bbd60f855e8d0b0d043 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1769,6 +1769,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
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 d723b4331203aee5c33f19b0b64e69cb577e51a8..2bed70446b3316b48214b3ed1b43542d699dede8 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2897,7 +2897,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);