promotional bannermobile promotional banner

Advanced Armor Damage Limit

Limit per-hit armor durability damage with a legacy percentage cap or custom expressions based on armor durability and Unbreaking level.
DxEVIL | Advanced Armor Damage Limit
Create a server, get 25% off your first monthaffiliate logo
Create Server
affiliate banner image

Advanced Armor Damage Limit

Advanced Armor Damage Limit prevents a single hit from removing an excessive amount of durability from each armor item. It is designed for modpacks where high-durability armor should remain meaningfully more durable instead of receiving proportionally larger durability losses.

Features

  • Legacy percentage mode for simple setups.
  • Custom per-item durability damage expressions.
  • Expressions can read the armor item's maximum durability through max_durability.
  • Expressions can read the item's Unbreaking enchantment level through unbreaking.
  • Per-item protection blacklist for modded armor.
  • Invalid expressions are reported in the log and do not prevent the game from starting.
  • The YiRan Expression Library is bundled in the released mod JAR; no separate library installation is required.

Custom expressions

Set Armor Damage Expression in the Forge or NeoForge configuration, or armor_damage_expression in the Fabric properties file. The expression result is the maximum durability damage for one armor item from one hit. The actual durability damage is also limited by the incoming damage.

Available variables:

  • max_durability: maximum durability of the armor item.
  • unbreaking: Unbreaking enchantment level on the armor item.

Example:

min(15 - unbreaking, max_durability * 0.05)

This example limits one hit to the smaller of 15 - unbreaking and 5% of the armor item's maximum durability. Values below zero are treated as zero.

When the expression is empty, the legacy percentage setting is used. The default legacy cap is 20% of the armor item's maximum durability per hit.

Expression syntax and examples

The expression library supports numeric arithmetic (+, -, *, /, %), parentheses, comparisons (<, <=, >, >=, ==, !=), and the ternary conditional operator (condition ? when_true : when_false). Built-in functions are min, max, abs, sqrt, and pow.

All expressions are numeric. A comparison evaluates to 1 when true and 0 when false. Use max(0, ...) when a subtraction could produce a negative result.

Segment by maximum durability:

max_durability < 100 ? 4 : max_durability < 500 ? 10 : max_durability * 0.05

This returns 4 for armor below 100 maximum durability, 10 for armor from 100 through 499, and 5% of maximum durability for armor at 500 or above.

Segment by Unbreaking level:

unbreaking < 2 ? 12 : unbreaking < 4 ? 8 : 4

This returns 12 at Unbreaking levels 0-1, 8 at levels 2-3, and 4 at level 4 or higher.

Combine durability tiers with Unbreaking:

max(0, min(max_durability < 500 ? 10 : max_durability * 0.05, 15 - unbreaking))

For a 500-durability item with Unbreaking II, this evaluates to min(25, 13) = 13. For an 80-durability item with no Unbreaking, it evaluates to min(10, 15) = 10.

Put the expression on one line in the configuration file:

Armor Damage Expression = "max_durability < 100 ? 4 : max_durability < 500 ? 10 : max_durability * 0.05"
armor_damage_expression=max(0, min(15 - unbreaking, max_durability * 0.05))

The expression result is the cap for one armor item from one hit. Incoming damage can reduce the final value further. A result of 0 skips durability damage; a positive result below 1 still causes one point because item durability damage is integral. If an expression is invalid, the error is logged and that hit falls back to uncapped incoming durability damage.

Configuration

Forge and NeoForge use config/AdvancedArmorDamageLimit.toml.

Fabric uses config/AdvancedArmorDamageLimit.properties.

The item blacklist accepts registry IDs such as modid:item_name. Blacklisted armor keeps the normal Minecraft durability behavior.

Supported versions

Separate builds are provided for:

  • Forge 1.19.2
  • Forge 1.20.1
  • NeoForge 1.21.1
  • NeoForge 1.26.1.2
  • Fabric 1.21.1

Install the JAR matching both your Minecraft version and mod loader.

License

Advanced Armor Damage Limit is released under the GNU Affero General Public License v3.0 only (AGPL-3.0-only). The project includes YiRanExpressionLib under GNU AGPL v3. See LICENSE, NOTICE.md, and licenses/YiRanExpressionLib-LICENSE.txt for the complete licensing information.

Advanced Armor Damage Limit Team

profile avatar
Owner
  • 3
    Followers
  • 36
    Projects
  • 50.6K
    Downloads

More from DxEVILView all

  • Last One Core project image

    Last One Core

    Makes Confluence prefixes configurable: editable prefix pools, compatible attributes, item eligibility, prefix selection, and rarity/crit behavior.

    • 34
    • October 26, 2026
  • Visual Skill Tree Editor project image

    Visual Skill Tree Editor

    An in-game visual skill tree editor add-on for Pufferfish's Skills. Create and edit categories without hand-editing every data pack JSON file.

    • 391
    • October 22, 2026
  • puffish apothic attributes fix project image

    puffish apothic attributes fix

    Fixes Pufferfish’s dynamic attributes in the Apothic Attributes screen and displays Pufferfish’s Skills attribute modifiers with their corresponding skill icons.

    • 6.3K
    • October 21, 2026
  • Dungeons Perspective Unofficial project image

    Dungeons Perspective Unofficial

    Dungeons Perspective Unofficial is an unofficial Forge 1.20.1 port of the original Dungeons Perspective mod. It changes Minecraft's camera perspective to feel closer to Minecraft Dungeons while keeping the original project's core idea and controls.

    • 1.5K
    • October 20, 2026
  • Last One Core project image

    Last One Core

    Makes Confluence prefixes configurable: editable prefix pools, compatible attributes, item eligibility, prefix selection, and rarity/crit behavior.

    • 34
    • October 26, 2026
  • Visual Skill Tree Editor project image

    Visual Skill Tree Editor

    An in-game visual skill tree editor add-on for Pufferfish's Skills. Create and edit categories without hand-editing every data pack JSON file.

    • 391
    • October 22, 2026
  • puffish apothic attributes fix project image

    puffish apothic attributes fix

    Fixes Pufferfish’s dynamic attributes in the Apothic Attributes screen and displays Pufferfish’s Skills attribute modifiers with their corresponding skill icons.

    • 6.3K
    • October 21, 2026
  • Dungeons Perspective Unofficial project image

    Dungeons Perspective Unofficial

    Dungeons Perspective Unofficial is an unofficial Forge 1.20.1 port of the original Dungeons Perspective mod. It changes Minecraft's camera perspective to feel closer to Minecraft Dungeons while keeping the original project's core idea and controls.

    • 1.5K
    • October 20, 2026