Skip to content

Combat draft

Wisla edited this page Apr 2, 2026 · 1 revision

Combat Draft

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.


How it works

Every 20 ticks (1 second), BuffMobs checks each eligible mob:

  1. Health check: Is the mob's health ≤ healthThreshold × maxHealth? (default: 20%)
  2. Cooldown check: Has enough time passed since the last use (cooldownTicks)?
  3. Use limit check: Has the mob exceeded maxUses (if limited)?

If all three pass, the mob:

  1. Stores its current off-hand item.
  2. Places a Potion item in its off-hand.
  3. Begins the vanilla "drink" animation (32 ticks / 1.6 seconds).
  4. Plays the drink sound.
  5. Applies the effect immediately.
  6. 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.


Living vs. Undead behavior

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

Whitelist / Blacklist

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"]

Tips

  • 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 = 1 gives 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.

Clone this wiki locally