Files
Purpur/patches/server/0053-Fix-the-dead-lagging-the-server.patch
William Blake Galbreath 13b1d3715e Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
eaadb4a68f Fix Java toolchain configuration to work on arm macOS
8bebf48495 Mark sensor and behavior timings as verbose
6855505490 Fix some inconsistency issues with empty map items (#6304)
ed1dc272e6 Add System.out.println catcher (#6278)
112b6a508a Add force getter to ParticleBuilder (#6300)
a44f486694 Allow plugins to use Log4J to log (#6288)
8c28a33d4e Don't not shuffle visible chunks (#6283)
0e978ea45e Rewrite LogEvents to contain information about the source jar of stacktrace elements (#6142)
6e7f9aafd6 Prevent AFK kick while watching end credits (#6239). (#6265)

Tuinity Changes:
61c9a54783 Don't use CI build number for implementation version (#356)
dc9d19c984 Update packet limiter config to accept mojang or spigot packet class names (#322)
2021-08-02 16:11:12 -05: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 9b6ee1fc3fd17faf2c2be56c0c292b1d5f98e0fa..24f4c130a539b3a42bf13f9bd4d264f9c84dec3b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1735,6 +1735,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
+ 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 a8412dd9609559e4840e5823e5472ada625ae3f3..9f82479d3b1822d91f3e91f0e980200b9dcce962 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2884,7 +2884,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);