Scissors/patches/server/0025-Fix-negative-death-times.patch

20 lines
972 B
Diff
Raw Normal View History

2022-04-19 10:56:30 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
2022-06-04 00:31:43 +00:00
Date: Fri, 3 Jun 2022 19:30:14 -0500
2022-04-19 10:56:30 +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
2022-06-04 00:31:43 +00:00
index d6ef140bcc35b10f78f2ec2f10c8a153395fc9df..d8393887cc98930815864eca28b07ef89b26f39e 100644
2022-04-19 10:56:30 +00:00
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
2022-06-04 00:31:43 +00:00
@@ -620,7 +620,7 @@ public abstract class LivingEntity extends Entity {
2022-04-20 00:05:57 +00:00
2022-04-19 10:56:30 +00:00
protected void tickDeath() {
++this.deathTime;
2022-06-04 00:31:43 +00:00
- if (this.deathTime == 20 && !this.level.isClientSide()) {
+ if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level.isClientSide()) {
this.level.broadcastEntityEvent(this, (byte) 60);
2022-04-19 10:56:30 +00:00
this.remove(Entity.RemovalReason.KILLED);
}