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 c8071e2909c03bd8eafb92fbf8fd8701642df1f9..7c9fc120d2b58ca969b8a0ff9619e96f4f34b1c4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1631,6 +1631,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.lastYaw = this.yaw; this.lastPitch = this.pitch; + if (valid && !dead) world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit // Paper // Purpur } public void f(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java index 1602c00e04cccdee4e9eb4f4512145e8b1aeaf57..c540886511261303d2266ac97353e1b98c1f9601 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2597,7 +2597,7 @@ public abstract class EntityLiving extends Entity { } } - this.movementTick(); + if (!dead) this.movementTick(); // Purpur double d0 = this.locX() - this.lastX; double d1 = this.locZ() - this.lastZ; float f = (float) (d0 * d0 + d1 * d1);