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: 8fa15382b [Auto] Updated Upstream (CraftBukkit) 732b2f6b5 [CI-SKIP] [Auto] Rebuild Patches c5a39ffa2 Add BlockPreDispenseEvent (#5075) 8aeb4c9c3 Correctly skip pathfinder ticks for inactive entities (#5085) 0e420049c Fix console spam when removing chests in water 56b7935bb Add PlayerChangeBeaconEffectEvent 2eda45c34 added Wither API 97d0c571b Added Vanilla Entity Tags fccac282a fix NPE in getDisplayNameComponent 24e140372 Configurable max leash distance Tuinity Changes: d3ee22224 Merge dev/lighting
32 lines
1.6 KiB
Diff
32 lines
1.6 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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 4ed4f31c8e34279f9aa9fd7bbddbb36239ea36ef..f18941c7c740959181b728ab9da06c7e9d97aa79 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -1523,6 +1523,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
|
|
this.lastYaw = this.yaw;
|
|
this.lastPitch = this.pitch;
|
|
+ if (valid && !dead) world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit // Paper // Purpur
|
|
}
|
|
|
|
public void f(double d0, double d1, double d2) {
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
index bef80c83c551abe2cc23cf73e6c737313ad399c9..9b1ecf6101e146843b4d2eeabc3e0e3c4fde54b5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -2492,7 +2492,7 @@ public abstract class EntityLiving extends Entity {
|
|
}
|
|
}
|
|
|
|
- this.movementTick();
|
|
+ if (!dead) this.movementTick(); // Purpur
|
|
double d0 = this.locX() - this.lastX;
|
|
double d1 = this.locZ() - this.lastZ;
|
|
float f = (float) (d0 * d0 + d1 * d1);
|