HomeJavaModsWearAndTear
WearAndTear
WearAndTear — screenshot 1WearAndTear — screenshot 2

I often play with vanilla tweaks when playing modern. One of my favorite datapacks is diminishing tools. This mod aim to add this functionality to BTA. In future this will be possible via assets pack but for now is only possible though modding.

🪓 Diminishing Tools

Wear & Tear support most tools. Tool start showing marks of wear and tear at 25% durability and further signs at 15, 5% durability. This mod is client side only, and should allow players to connect to vanilla server. The mod has no dependencies aside toml that is budles into the jar.

🖼️ Mod Support

Modder are happy to adopted this mod by defining a configuration by which the item new texture are loaded. Importantly the call to super.getIcon() has to be preserved in some form for the icon to be resolved correctly.

Here is an example of the configuration file. The name of a given file is [name of Item].item.toml:

type = "durability" # metadata/durability
textures = [
  {name = "a", threshold = 0.75}, # name is the name of the texture
  {name = "b", threshold = 0.85}, # threshold, point of mising durability at whice this icon is shown
  {name = "c", threshold = 0.95}  # The game assumes all icon are in the directory : assets/[modID]/textures/item/[item.name]/
]

Type metadata allows the use of specific metadata value (for more precision)

🎤 Asset pack support

Simular to modding Wear and Tear also support asset packs. Just define the configuration (see Mod Support) for the item, include the desired texture and package it as a valid texture pack. The game will be able to load and unload these textures freely.

⚽ Goals:

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more