Scissors/patches/server/0019-Fix-negative-death-times.patch
2024-01-23 19:05:59 -06:00

20 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
Date: Mon, 18 Apr 2022 16:55:19 +0100
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
index f0d565ac0b3c8d3c3a200348a16e7db21ff3920a..7976953ff2fcaa52cb2edcbeb686690e6f3c1953 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -628,7 +628,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void tickDeath() {
++this.deathTime;
- if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
+ if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level().isClientSide() && !this.isRemoved()) { // Scissors
this.level().broadcastEntityEvent(this, (byte) 60);
this.remove(Entity.RemovalReason.KILLED);
}