mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
progress
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
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 5e9b67f0a5a8052b3f769b4a66b5c230401bd57f..a57640ba4d1c9f3d9b34d35d181d560dcbfb6994 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1549,6 +1549,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
|
||||
this.yRotO = this.getYRot();
|
||||
this.xRotO = this.getXRot();
|
||||
+ 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 95e1fa6fa3327e1ea3553128806befccd02828a0..151951df341b0f875610928aeb86c856325d5fa1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2877,7 +2877,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);
|
||||
Reference in New Issue
Block a user