mirror of https://github.com/YatopiaMC/Yatopia.git
32 lines
1.7 KiB
Diff
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 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 906791fc6180e011ce029ac95a63c92553f0377e..6fb4b06df010c3099a1af3b145749ea439a4aa39 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);
|