-
Notifications
You must be signed in to change notification settings - Fork 0
Combat draft
Wisla edited this page Apr 2, 2026
·
1 revision
CombatDraft gives eligible hostile and neutral mobs the ability to drink a regeneration potion mid-fight when their health drops below a threshold. It makes mobs feel more intelligent and creates more tense, drawn-out fights.
Every 20 ticks (1 second), BuffMobs checks each eligible mob:
-
Health check: Is the mob's health ≤
healthThreshold × maxHealth? (default: 20%) -
Cooldown check: Has enough time passed since the last use (
cooldownTicks)? -
Use limit check: Has the mob exceeded
maxUses(if limited)?
If all three pass, the mob:
- Stores its current off-hand item.
- Places a Potion item in its off-hand.
- Begins the vanilla "drink" animation (32 ticks / 1.6 seconds).
- Plays the drink sound.
- Applies the effect immediately.
- Restores the original off-hand item after the animation.
The mob's off-hand drop chance is set to 0 to prevent the temporary potion from dropping if the mob dies during the animation.
| Mob type | Effect applied |
|---|---|
| Living (normal) | Regeneration I–X for regenDuration seconds |
| Undead (zombie, skeleton, etc.) | Absorption I–X + flat heal equal to (amplifier + 1) × 4 HP |
The blacklist is always applied (on top of the hardcoded list). The whitelist is only consulted when useWhitelist = true.
Blacklist example — prevent zombies from drinking:
blacklist = ["minecraft:zombie", "minecraft:zombie_villager"]
Whitelist example — only let bosses drink:
useWhitelist = true
whitelist = ["minecraft:wither_skeleton", "minecraft:elder_guardian"]
-
Lower
healthThreshold(e.g.0.10) means mobs wait until they're nearly dead before drinking — fights stay short but the comeback is dramatic. -
Raise
healthThreshold(e.g.0.50) for mobs that drink when half-health — creates much longer, more sustained fights. -
maxUses = 1gives every mob exactly one "second wind" per life, balancing challenge without making mobs unkillable. -
cooldownTicks = 200(10 seconds) makes the system more aggressive; lower cooldowns mean mobs can chain-drink in very long fights. - Combine with high
regenAmplifier(6–8) for bosses or named mobs via the whitelist for dramatic comeback moments.