Skip to content

TecTobi/durabilityinfo

 
 

Repository files navigation

DurabilityInfo

Track your item durability everywhere — tooltip, HUD, and configurable warnings.

HUD and Tooltip Preview

Features

🛡️ Item Tooltip

Shows durability info directly on every damageable item's tooltip:

  • NumbersDurability: 235 / 500
  • PercentageDurability: 47%
  • Color-coded bar — green → yellow → red as durability drops

🖥️ HUD Overlay

Always-visible durability display on screen:

  • Shows item icons with a colored durability bar (or percentage) under each
  • Displays: helmet, chestplate, leggings, boots, main hand, offhand
  • Semi-transparent background for readability
  • Configurable position (top-left/right, bottom-left/right) + X/Y offset

⚠️ Low Durability Warning

  • Configurable threshold (warningThreshold, default: 10%)
  • Below threshold: red flashing bar + ITEM_BREAK sound (2s cooldown)
  • Helps prevent tools and armor from breaking unexpectedly

Configuration Screen

Configuration

File: .minecraft/config/durabilityinfo.json

The mod has three independent subsystems that can be toggled separately:

Master toggle Default What it controls
enableHud true On-screen durability HUD overlay
enableTooltipInfo true Durability info added to item tooltips
enableWarnings true Low-durability sound + flashing bar

Tooltip options

Option Default Description
showDurabilityNumbers true Show current / max durability in tooltip
showPercentage true Show durability percentage in tooltip
showBar true Show color-coded ASCII durability bar in tooltip
showOnUnbreakable false Show info on items marked unbreakable
showDamageDealt false Show damage taken instead of remaining durability (HUD percentage mode)
hideFullDurabilityItems false Skip tooltip lines for items at full durability

HUD options

Option Default Description
hudAnchor BOTTOM_RIGHT TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT
hudDisplayMode BAR BAR (icon + bar) or PERCENTAGE (icon + % text)
hudOffsetX 4 Horizontal pixel offset from the anchor
hudOffsetY 4 Vertical pixel offset from the anchor
hudScale 1.0 Layout scale factor (clamped to 0.53.0). The vanilla item icon stays 16 px.
hudBackgroundEnabled true Draw the semi-transparent background panel
showItemNamesInHud false Render the item name under each entry
showOnlyDamagedItemsInHud false Hide HUD entries that are still at full durability
hideHudInCreative true Don't render the HUD in Creative mode
hideHudWhenDebugScreenOpen true Don't render the HUD while F3 is open

Warning options

Option Default Description
warningThreshold 10 Percentage at or below which an item is considered low (clamped to 0100)
warningCooldownSeconds 2 Minimum seconds between consecutive warning sounds
warningSoundEnabled true Play the ITEM_BREAK sound on transition into low durability
warningFlashEnabled true Flash the HUD bar/percentage in red while low

Keybinds

The mod registers four keybinds, all unbound by default so they never collide with vanilla or other mods. Bind (or unbind) them from Options → Controls → Key Binds → Miscellaneous:

  • Toggle DurabilityInfo HUD
  • Toggle DurabilityInfo Tooltip
  • Toggle DurabilityInfo Warnings
  • Open DurabilityInfo Config (requires Cloth Config)

Toggling persists immediately to durabilityinfo.json and shows a short action-bar message — disable that via keybindFeedbackEnabled if you prefer silent toggles.

Option Default Description
keybindFeedbackEnabled true Show an action-bar message when a toggle keybind is pressed

All numeric values are clamped on load; malformed JSON falls back to defaults without crashing the game.

If Cloth Config and Mod Menu are installed, every option is editable in-game from the Mods screen, grouped into General / Tooltip / HUD / Warnings categories with hover tooltips.

Requirements

Optional

License

MIT — see LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%