mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
[ci skip] Small refactor for the dead patch
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From d8aa4d7aa73dd3d8f6dd48fe9cb2309d6f1bfc74 Mon Sep 17 00:00:00 2001
|
||||
From aff40f64adfb63132461e3793b998b0af84baeab 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] The dead dont move...
|
||||
Subject: [PATCH] Fix the dead lagging the server
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/Entity.java | 2 +-
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] The dead dont move...
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 697c1d562..4c68e0f77 100644
|
||||
index 697c1d562..bb9ef77a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1343,7 +1343,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -17,12 +17,12 @@ index 697c1d562..4c68e0f77 100644
|
||||
this.lastYaw = this.yaw;
|
||||
this.lastPitch = this.pitch;
|
||||
- world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
|
||||
+ if (isAlive()) world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit // Purpur
|
||||
+ if (!dead) world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit // Purpur
|
||||
}
|
||||
|
||||
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index e3dc406da..dc6efdb8d 100644
|
||||
index e3dc406da..0f0b01f57 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2385,7 +2385,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -30,7 +30,7 @@ index e3dc406da..dc6efdb8d 100644
|
||||
}
|
||||
|
||||
- this.movementTick();
|
||||
+ if (isAlive()) this.movementTick(); // Purpur
|
||||
+ if (!dead) this.movementTick(); // Purpur
|
||||
double d0 = this.locX() - this.lastX;
|
||||
double d1 = this.locZ() - this.lastZ;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
Reference in New Issue
Block a user