mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@512995c Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7359) PaperMC/Paper@0a9602c [ci skip] Fix multiple ItemStack array nullability mistakes (#7055)
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 27d95f88ef904402c1277818734310c9e37f9cde..ec4f6a2589999e1f2294f50742ece72236a9c7bd 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1769,6 +1769,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
|
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 726909f539a72bebacde7547d8dfabff0a2469e1..63561520a1e4ff37b5ba012dfffb01ad052c1b45 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2930,7 +2930,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);
|