mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
drop patches
This commit is contained in:
31
patches/server/0049-Fix-the-dead-lagging-the-server.patch
Normal file
31
patches/server/0049-Fix-the-dead-lagging-the-server.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
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 0f34da80fe3dabe264c7cbb894f6f732d068a4b6..b8dbd508a25035e899fbc38643f4b38510688c47 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1650,6 +1650,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 5ae294293cd9d813e22d251e567d1fc0929edc49..dfbb53ddf9255351b44259d0016b362a3a4625b3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2896,7 +2896,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