mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-08-25 15:22:47 +02:00
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
From fc45a9b242c546a092125e45b6d5babb389a4275 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Tue, 21 Apr 2020 15:42:56 +0200
|
|
Subject: [PATCH] Purpur Restrict dead entities
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/Entity.java | 2 +-
|
|
src/main/java/net/minecraft/server/EntityLiving.java | 2 +-
|
|
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 0d523338e9..9622a21ed6 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -1550,7 +1550,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;
|
|
- world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
|
|
+ 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 c240d4877f..292c4bda9e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -2400,7 +2400,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);
|
|
--
|
|
2.25.1.windows.1
|
|
|