mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 16:29:16 +00:00
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Fri, 8 Dec 2023 18:21:56 +0000
|
|
Subject: [PATCH] Add instant mob death animation
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index 691f2c1d00d3cb17af017c997b11525709d6cd15..f2e0f4eb5f07ef4bd31282f3d12b8d8380ce22a0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1696,6 +1696,12 @@ public abstract class LivingEntity extends Entity {
|
|
this.createWitherRose(entityliving);
|
|
}
|
|
|
|
+ // Sakura start
|
|
+ if (this.dead && this.level.sakuraConfig().entity.instantDeathAnimation && !(this instanceof Player)) {
|
|
+ this.deathTime = 20;
|
|
+ return;
|
|
+ }
|
|
+ // Sakura end
|
|
if (this.dead) { // Paper
|
|
this.level.broadcastEntityEvent(this, (byte) 3);
|
|
this.setPose(Pose.DYING);
|