From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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 cbd0f1ef7b3dad972b2e1f4b1d35c1f66ca9854f..10c46a38e55463f584afc69bd6af91ee96862fd8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1832,6 +1832,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 5e161a8cdd6d6303fa334600f70ac0352807c756..38067bee49ec2498d840ded86ceeae4518034ae1 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2953,7 +2953,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);