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

20 lines
1.1 KiB
Diff
Raw Normal View History

2022-07-28 03:57:50 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2024-02-24 22:32:31 +00:00
From: Telesphoreo <me@telesphoreo.me>
Date: Sat, 24 Feb 2024 15:32:48 -0600
2022-07-28 03:57:50 +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
2024-04-16 03:24:44 +00:00
index e9bb7feb591032904516d1b9374f486d8a7d066c..60961c54e870148b5c649045e7347ca1064b6bde 100644
2022-07-28 03:57:50 +00:00
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
2024-02-24 22:32:31 +00:00
@@ -629,7 +629,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
2022-07-28 03:57:50 +00:00
protected void tickDeath() {
++this.deathTime;
2023-06-09 00:58:46 +00:00
- if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
+ if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level().isClientSide() && !this.isRemoved()) { // Scissors
2023-06-09 00:58:46 +00:00
this.level().broadcastEntityEvent(this, (byte) 60);
2024-02-24 22:32:31 +00:00
this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
2022-07-28 03:57:50 +00:00
}