mirror of
https://github.com/neoforged/NeoForge.git
synced 2025-12-10 00:22:25 -06:00
Co-authored-by: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com>
This commit is contained in:
parent
28b7490e58
commit
5cd706524f
@ -37,18 +37,3 @@
|
||||
if (p_219160_.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) {
|
||||
return flag;
|
||||
}
|
||||
@@ -559,10 +_,14 @@
|
||||
.addOrReplacePermanentModifier(
|
||||
new AttributeModifier(LEADER_ZOMBIE_BONUS_ID, this.random.nextDouble() * 0.25 + 0.5, AttributeModifier.Operation.ADD_VALUE)
|
||||
);
|
||||
+ var damageTaken = getMaxHealth() - getHealth();
|
||||
this.getAttribute(Attributes.MAX_HEALTH)
|
||||
.addOrReplacePermanentModifier(
|
||||
new AttributeModifier(LEADER_ZOMBIE_BONUS_ID, this.random.nextDouble() * 3.0 + 1.0, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)
|
||||
);
|
||||
+ // Neo: fix MC-219981 by resetting the leader zombie's health based on the new max health
|
||||
+ // without disregarding damage already taken (if any)
|
||||
+ setHealth(getMaxHealth() - damageTaken);
|
||||
this.setCanBreakDoors(true);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user