Displays current durability of Tools and Armor!

How to Install
Insall in Pre-existing world
- Download the datapack
- Put the zip file in the
/datapackfolder of your world-save%appdata%/.minecraft/saves - Full path should be something like
C:\Users\[USERNAME]\AppData\Roaming\.minecraft\saves\[WORLDNAME]\datapacks - run
/reloadin gameInsall in a New world
- Download the datapack
- Start creating a new world
- Click the More Tab
- Click the Datapacks Button
- Click Open Pack Folder, put the downloaded zip file in the explorer window
- run
/reloadin gameEnable Icons (optional)
- Install the actual datapack
- Download the resource pack
- Install and enable the resource pack
- run the command
/trigger DurabilityHud.resourcepack - Enjoy
Included Commands
- Enable icons (requires resourcepack)
/trigger DurabilityHud.resourcepack - Toggle Durability Hud per player
/trigger DurabilityHud.toggle - Show/Hide armor durability
/trigger DurabilityHud.armor
For Developers (how to get items to work with this pack)
As long as a item has the component max_damage it should display correctly. But as of 1.21.3 plain items from minecraft (and plain modded ones) dont come with the max_damage component by default. Therefore we hardcode these values, but as long as max_damage exists you should be fine.
If adding max_damage is not a option then it is possible to modify/override the get.max.[Slot].default.mcfunction to return custom max damage values for custom item types. Or add custom items to the existing durability.max.[maxdurability].json tag files under tags/item/....
items that are unable to get max damage will display negative values.
How to Install Durability Hud (Datapack)
Durability Hud by LeonNikolai is verified for Datapack across Minecraft versions 1.21.3 (latest release: 1.0, file size: 362 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21.3) and platform (Datapack).
- Make sure you have the compatible loader or environment installed for Datapack.
- Move the downloaded Durability Hud file into your Minecraft
.minecraft/saves/<world>/datapacksfolder and launch the game.
- Initial 1.21.3 rewrite of similar datapack i made for 1.17