Scissors/patches/server/0020-Fix-negative-death-times.patch
Telesphoreo 5e3b6a6cf9 Checkpoint
The patches apply, this is to see if it will actually build
2022-12-10 23:26:17 -06:00

20 lines
1015 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
Date: Sat, 10 Dec 2022 23:23:52 -0600
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 9e075de3542bda8ae086c9ca68bcd00b16d565d0..2012c147f60f39ae7dbae74641fd00b3b282a991 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -622,7 +622,7 @@ public abstract class LivingEntity extends Entity {
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()) {
this.level.broadcastEntityEvent(this, (byte) 60);
this.remove(Entity.RemovalReason.KILLED);
}