Quality API One item quality system that every mod can share.
Quality API gives items a quality tier: Crude, Standard, Fine, Superior, Exquisite, Masterwork. A masterwork pickaxe lasts longer, mines faster and acts as if it had extra Unbreaking. A crude sword hits softer and wears out sooner. Every tier, every number and every effect is defined in datapacks, and any mod can apply, read or react to quality through a small API, so a forging mod, a loot mod and a skills mod all speak the same language instead of inventing their own.
It works on its own too. Enable rolling on craft or add the loot modifier to your pack and quality shows up with no other mods installed.
What quality does Attributes: attack damage, armor, or any attribute, per tier and per item or tag Durability: a multiplier applied live, so it also shows in the durability bar and tooltip Mining speed: per tier Bonus enchantment levels: a tier can act as extra Unbreaking, Efficiency, Protection, anything Tooltips: the item name takes the tier colour, plus a tier line and an optional "Crafted by" line Broken, not destroyed Quality items that hit zero durability don't vanish. They become broken: unusable until repaired at an anvil, grindstone or with Mending. Breaking has a chance to drop the item one tier, so pushing your masterwork sword to the limit is a real gamble. Chance, whether the top tier is protected, and whether the feature is on at all are all configurable.
Quality carries through crafting Craft with quality ingredients and the result inherits: highest, lowest or average of the ingredients, your choice. A masterwork tool head becomes a masterwork pickaxe. The preview in the crafting grid shows the outcome before you commit, and shift-clicking keeps it. An optional downgrade chance adds risk.
For pack makers Everything is data:
Tiers live in data/<namespace>/quality_api/quality/. Set the level, colour, roll weight, which items a tier may apply to, and its effects. Per-item and per-tag overrides use a NeoForge data map, so #minecraft:swords can get attack damage while #minecraft:chest_armor gets armor, and one specific sword can differ from the rest. Loot: the quality_api:roll_quality global loot modifier rolls quality on chest loot, with a chance field and standard loot conditions to scope it to specific tables. Recipes: the quality_api:min_quality ingredient requires "at least this tier". Exact tiers work with NeoForge's built-in component ingredient. Blacklist: put items in #quality_api:blacklist and they never receive quality. /quality set <tier> and /quality remove for testing. Six tiers ship with sensible defaults. Rename them, rebalance them, or replace them entirely.
For developers A static Qualities class does the work: get the tier or its level from a stack, check whether a tier can apply, apply or remove one, roll a weighted tier, or convert a score or level into a tier. QualityCraftEvent lets your mod decide the tier of any crafted result, with the crafting input and player in hand. The API has no side effects before world load, so the usual "if loaded" bridge pattern works.
Compatibility Nothing is baked onto items. Effects are computed live from the tier id, so a datapack rebalance reaches items already in the world, and quality survives smithing upgrades and anvil repairs. Attribute bonuses are added alongside vanilla and other mods' modifiers, never over them.
Requires NeoForge for Minecraft 1.21.1.

