Durability Preservation Attributes

Quick rating

Durability Preservation Attributes

No reviews yet

Adds player attributes which give a percentage chance to prevent durability loss on equipment.

QoL & Tweaks
Mod Loaders
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
durability_preservation_attributes-1.1.0 [Neoforge 1.21.1].jar

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Durability Preservation Attributes

A mod that adds player attributes which give a percentage chance to prevent durability loss on equipment.

The mod currently adds these attributes:

  • durability_preservation_attributes:durability_save_chance
  • durability_preservation_attributes:armor_durability_save_chance
  • durability_preservation_attributes:shield_durability_save_chance
  • durability_preservation_attributes:weapon_durability_save_chance
  • durability_preservation_attributes:projectile_durability_save_chance
  • durability_preservation_attributes:break_durability_save_chance
  • durability_preservation_attributes:use_durability_save_chance

What The Mod Does

Each attribute represents a chance from 0.0 to 1.0 to retain durability upon the usage of equipment:

  • 0.0 = 0% chance to save durability
  • 0.25 = 25% chance to save durability
  • 1.0 = 100% chance to save durability

What each attribute affects:

  • durability_save_chance: a global durability save chance added to every category below
  • armor_durability_save_chance: armor durability loss when the player takes damage
  • shield_durability_save_chance: shield durability loss when the player blocks damage
  • weapon_durability_save_chance: durability loss when the player attacks a living entity with a damageable melee weapon
  • projectile_durability_save_chance: durability loss when the player uses projectile weapons such as bows and crossbows
  • break_durability_save_chance: durability loss from breaking blocks with damageable tools
  • use_durability_save_chance: durability loss from using damageable items, such as flint and steel and other right-click style item uses

The global attribute is additive with the category-specific attributes.

Examples:

  • durability_save_chance = 0.10 and armor_durability_save_chance = 0.10 gives armor a total save chance of 0.20 (20% chance)
  • durability_save_chance = 0.25 and break_durability_save_chance = 0.40 gives block breaking a total save chance of 0.65 (65% chance)

The total cannot go over 1.0 (100% chance)

Applying The Attributes With Commands

Minecraft's /attribute command can be used to set these values directly on a player.

General format:

/attribute <target> <attribute_id> base set <value>

Examples:

/attribute @s durability_preservation_attributes:durability_save_chance base set 0.10
/attribute @s durability_preservation_attributes:armor_durability_save_chance base set 0.20
/attribute @s durability_preservation_attributes:shield_durability_save_chance base set 0.35
/attribute @s durability_preservation_attributes:weapon_durability_save_chance base set 0.15
/attribute @s durability_preservation_attributes:projectile_durability_save_chance base set 0.50
/attribute @s durability_preservation_attributes:break_durability_save_chance base set 0.25
/attribute @s durability_preservation_attributes:use_durability_save_chance base set 0.40

You can also read the current value:

/attribute @s durability_preservation_attributes:break_durability_save_chance get

And reset a value back to zero:

/attribute @s durability_preservation_attributes:use_durability_save_chance base set 0.0

How It Works Behind The Scenes

This mod is server-authoritative and event-driven.

  • Armor and shield durability are handled through NeoForge durability-related events.
  • Melee, projectile, block-breaking, and item-use durability are handled by taking a short-lived snapshot of the relevant ItemStack, letting vanilla or modded logic run, and then restoring the original damage value if the durability-save roll succeeds.
  • The preservation roll is based on the player's global durability_save_chance plus the relevant category-specific attribute, and the combined result is clamped to the 0.0 to 1.0 range.
  • Attribute values are synced, so modifiers from commands, gear, datapacks, or other mods can affect them.
  • The mod does not scan inventories every tick. It only tracks a small pending restore state for players who have just performed a relevant action.

Server Behavior And Synchronization

The mod is designed to work correctly on servers.

  • Durability decisions are made on the server.
  • Restore logic runs on the server after the relevant action completes.
  • This avoids client-authoritative durability changes and reduces the risk of client/server desync.

Mod Compatibility

The mod is written to work with vanilla items and with modded items that use the normal NeoForge or vanilla durability paths.

This includes most modded:

  • armor
  • shields
  • melee weapons
  • bows
  • crossbows
  • tools
  • damageable right-click items

Important compatibility note:

If another mod bypasses normal durability hooks and directly mutates item damage entirely in custom code, no event-based compatibility layer can guarantee interception. In practice, items that follow standard Minecraft or NeoForge behavior should work correctly.

Performance

The mod is lightweight by design.

  • No continuous inventory scanning
  • No per-player background processing beyond a tiny pending restore pass after relevant actions
  • Only reacts when the player performs durability-affecting actions

For normal gameplay, performance impact should be minimal.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works