feat: old leader zombie health logic

close https://github.com/LuminolMC/Lophine/issues/157
This commit is contained in:
Helvetica Volubi
2026-07-02 18:52:09 +08:00
parent 07073cb4a3
commit f7ad2f93f1
37 changed files with 22 additions and 0 deletions
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Thu, 2 Jul 2026 18:49:40 +0800
Subject: [PATCH] Old leader zombie health logic
diff --git a/net/minecraft/world/entity/monster/zombie/Zombie.java b/net/minecraft/world/entity/monster/zombie/Zombie.java
index 2734ffc103ee4760d3521609fdd090ab99df675b..a99683d341f52139003dfa5190ee118d5b06f59f 100644
--- a/net/minecraft/world/entity/monster/zombie/Zombie.java
+++ b/net/minecraft/world/entity/monster/zombie/Zombie.java
@@ -597,7 +597,7 @@ public class Zombie extends Monster {
.addOrReplacePermanentModifier(
new AttributeModifier(LEADER_ZOMBIE_BONUS_ID, this.random.nextDouble() * 3.0 + 1.0, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)
);
- if (spawnReason != EntitySpawnReason.CONVERSION && spawnReason != EntitySpawnReason.LOAD && spawnReason != EntitySpawnReason.DIMENSION_TRAVEL) {
+ if (!fun.bm.lophine.config.modules.function.OldFeatureConfig.oldLeaderZombieHealth && spawnReason != EntitySpawnReason.CONVERSION && spawnReason != EntitySpawnReason.LOAD && spawnReason != EntitySpawnReason.DIMENSION_TRAVEL) { // Lophine - Configurable option to disable health boost for leader zombies
this.setHealth(this.getMaxHealth());
}
@@ -13,6 +13,9 @@ public class OldFeatureConfig implements IConfigModule {
@ConfigInfo(name = "old_zombie_reinforcement") @ConfigInfo(name = "old_zombie_reinforcement")
public static boolean oldZombieReinforcement = false; public static boolean oldZombieReinforcement = false;
@ConfigInfo(name = "old_leader_zombie_health")
public static boolean oldLeaderZombieHealth = false;
@ConfigInfo(name = "old_explosion_damage_calculator") @ConfigInfo(name = "old_explosion_damage_calculator")
public static boolean oldExplosionDamageCalculator = false; public static boolean oldExplosionDamageCalculator = false;