mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@0c1643c Fix MC-252439 (#7994) PaperMC/Paper@0ae78d3 Fix advancement saving before reloads (#8003) PaperMC/Paper@f428887 Prevent empty items from being added to world (#7998) PaperMC/Paper@dd61319 Couple fixes for command blocks (#8004) PaperMC/Paper@d1b1c6f Add missing deprecation to AdvancementDisplayType (#7876) PaperMC/Paper@81f2eec [ci skip] rebuild patches PaperMC/Paper@e269a0a Fix incorrect random nextLong to nextInt (#8009) PaperMC/Paper@b77fe3a Temp: Disable javadoc.io for now PaperMC/Paper@7688112 [ci skip] restore jd.io PaperMC/Paper@b0eb4e0 Fix number parsing (#8013) Pufferfish Changes: pufferfish-gg/Pufferfish@fdfb106 Fix version checker pufferfish-gg/Pufferfish@b4104a6 Updated Upstream (Paper)
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 6e2c7db44373738b9c0bc30dff1078b04dafa98a..a33b5792a2966847568d6d96e696fef18200b872 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1870,6 +1870,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 ccc034d345d4c7ea1b8317023e2e410d5c231ec9..bc19439abb1cbf548b1eda2a6527d9e825ea34ab 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2974,7 +2974,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);
|