From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Allink 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 f636bdf1075fa784ce7ee25478d4d94bacb05677..77275e948b3636d21cca8f59c35834e8fdb339c7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -637,7 +637,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public boolean broadcastedDeath = false; // Folia - region threading protected void tickDeath() { ++this.deathTime; - if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved() && !this.broadcastedDeath) { // Folia - region threading + if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level().isClientSide() && !this.isRemoved() && !this.broadcastedDeath) { // Scissors // Folia - region threading this.level().broadcastEntityEvent(this, (byte) 60); this.broadcastedDeath = true; // Folia - region threading - death has been broadcasted if (!(this instanceof ServerPlayer)) this.remove(Entity.RemovalReason.KILLED); // Folia - region threading - don't remove, we want the tick scheduler to be running