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:26c37d99d5create random seeds for features using SecureRandom589bf2f1bfUpgrade gson to 2.8.8 (Closes #6370)0a6103597bGet entity default attributes (#6449)40057019e0Correctly inflate villager activation bounding box (#6798)e5f9241d15Left handed API (#6775)40ee63496cAdd advancement display API (#6175)9d570042edAdd ItemFactory#getMonsterEgg API (#6772)55ca459515rename method to getSpawnEggbb397ba74cAdd critical damage API (#6275)f47aeafe00Add Horse Animation API (#5599)7a0886180fAT & Mapping fixes (#6809)5553432644docs: Update gradle instructions for Java 16 (#6811) [ci skip]a1f49e4c60Fix command suggestion leak (#6592)9472d38f3cFix method name for Critical damage (#6813)
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 1ab4456b67b1b439b3b0e96f85de0fe104a5b2f8..082f8ede1d1839da7682a9cbb1ce16540f06b8ad 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1772,6 +1772,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
|
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 7b93c9799ea16f1ae91819e1c7c76fea7d9f0fe2..e60c2fe4f81c3660e009e3156e9ad3b5f3581dd0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2909,7 +2909,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);
|