mirror of
https://github.com/Samsuik/Sakura.git
synced 2026-01-04 15:31:43 +00:00
Add instant mob death animation
This commit is contained in:
@@ -621,10 +621,10 @@ index 0000000000000000000000000000000000000000..5fc23a0b579d7cbe03baf5324bef887a
|
||||
+}
|
||||
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ae06ef765e8e2aeabd2ba3b5af6d2506761bdabf
|
||||
index 0000000000000000000000000000000000000000..8edf0dd545b0664a8ae0079be7d92678f95374d0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||
@@ -0,0 +1,163 @@
|
||||
@@ -0,0 +1,164 @@
|
||||
+package me.samsuik.sakura.configuration;
|
||||
+
|
||||
+import com.mojang.logging.LogUtils;
|
||||
@@ -769,6 +769,7 @@ index 0000000000000000000000000000000000000000..ae06ef765e8e2aeabd2ba3b5af6d2506
|
||||
+ @Comment("Only modify if you know what you're doing")
|
||||
+ public boolean disableMobAi = false;
|
||||
+ public boolean waterSensitivity = true;
|
||||
+ public boolean instantDeathAnimation = false;
|
||||
+
|
||||
+ public Items items = new Items();
|
||||
+ public class Items extends ConfigurationPart {
|
||||
|
||||
23
patches/server/0053-Add-instant-mob-death-animation.patch
Normal file
23
patches/server/0053-Add-instant-mob-death-animation.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
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 7728492fd3623670482f4ca89e0934e7bcb972e1..6192f6a957855c8f64fd6c909dc150dd08586eb6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1765,6 +1765,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
// Paper start
|
||||
if (this.dead) { // Paper
|
||||
+ // Sakura start
|
||||
+ if (level().sakuraConfig().entity.instantDeathAnimation && !(this instanceof Player)) {
|
||||
+ this.deathTime = 20;
|
||||
+ return;
|
||||
+ }
|
||||
+ // Sakura end
|
||||
this.level().broadcastEntityEvent(this, (byte) 3);
|
||||
this.setPose(Pose.DYING);
|
||||
}
|
||||
Reference in New Issue
Block a user