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

20 lines
1.0 KiB
Diff
Raw Normal View History

2022-07-28 03:57:50 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
Date: Mon, 18 Apr 2022 16:55:19 +0100
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
2023-09-24 21:42:28 +00:00
index c039c77d0dd6ec1d336948ca6b5351d6fae1d8bb..6d851bf1cff06edf0717080c65a504c63914b8cd 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
2023-07-06 21:13:45 +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);
2022-07-28 03:57:50 +00:00
this.remove(Entity.RemovalReason.KILLED);
}