2022-07-28 03:57:50 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-12-11 05:26:17 +00:00
|
|
|
From: Telesphoreo <me@telesphoreo.me>
|
2023-06-09 00:58:46 +00:00
|
|
|
Date: Thu, 8 Jun 2023 19:24:05 -0500
|
2022-07-28 03:57:50 +00:00
|
|
|
Subject: [PATCH] Fix negative death times
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
2023-06-17 03:54:59 +00:00
|
|
|
index a189461330a4d427a7450d504ef13de3605497e3..79430aef1cbcad7d872435ebdec60321e2573bb3 100644
|
2022-07-28 03:57:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
2023-06-09 00:58:46 +00:00
|
|
|
@@ -630,7 +630,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
2022-07-28 03:57:50 +00:00
|
|
|
|
|
|
|
protected void tickDeath() {
|
|
|
|
++this.deathTime;
|
2023-06-09 00:58:46 +00:00
|
|
|
- if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
|
|
|
|
+ if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level().isClientSide() && !this.isRemoved()) {
|
|
|
|
this.level().broadcastEntityEvent(this, (byte) 60);
|
2022-07-28 03:57:50 +00:00
|
|
|
this.remove(Entity.RemovalReason.KILLED);
|
|
|
|
}
|