mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
a bunch more
This commit is contained in:
31
patches/server/0048-Fix-the-dead-lagging-the-server.patch
Normal file
31
patches/server/0048-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 be3545469c486f1dd6de42bb29a82a339d5a6a22..4ae9c7c0446fdb051ff976645dfa1b9f783bed3a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1796,6 +1796,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 5e161a8cdd6d6303fa334600f70ac0352807c756..38067bee49ec2498d840ded86ceeae4518034ae1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2953,7 +2953,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