Scissors/patches/server/0022-Fix-negative-death-times.patch
Luna 40a91ca05e
Slime (#136)
* Slime

* Add proper credits. Thanks ASP!

* Cleanup
2023-08-26 18:34:07 -05: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 e11d7283662834047b2ff81a2fd25a4263792deb..4bd7eea49a0720063db2a8ed10f53bd19e9499ad 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -629,7 +629,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);
}