Healthy DietFEATURE GUIDEEnglish
03 / QUALITY & RARITY

Quality, rarity and registered items

Quality labels, rarity styling and newly registered item IDs are three separate settings.

Quality bindingRarity overridesNew item IDs
Important distinction: Updating existing quality / rarity definitions is not the same as registering new items.

01Compare the three features

QualityA string ID defines label text, optional segments, styling and an overlay. Existing items bind it through their quality field.
RarityControls rarity labels and related item-name color, with custom or vanilla rarity; it does not register a new item.
Registered itemCreates a separate Healthy Diet item ID based on a source item, optionally with quality, name, model, eating behavior and stack size.

02Quality definitions and binding

Quality IDs are 1–64 lowercase letters, digits, underscores, hyphens or periods, not old numeric levels. Definitions reside at data/<namespace>/healthy_diet/quality_levels/<id>.json. For example config/healthy_diet/datapack/data/healthy_diet/healthy_diet/quality_levels/fresh.json is a valid path example; fresh is not necessarily a bundled quality. A definition may include text, colors, a scheme, segmented text and an overlay texture.

Use /hdui create (OP4) for definitions, and hold an existing item with /hdui to bind a defined ID. Definitions can be refreshed and synchronized; a client must have any required texture. Defining a quality does not bind it to all food, and referencing a nonexistent definition does not create a label.

Read-only UI diagram: /hdui create → Quality tab: choose an existing entry or + New, enter an ID, configure overlay and segmented text, preview, then Create / Save. Delete is available only for an existing definition. The diagram describes the in-game screen; this web page cannot save.

03Rarity and NBT precedence

Rarity definitions can include text, segments, color scheme and animation. In /hdui create (OP4), the Rarity tab creates or edits IDs of 1–64 lowercase letters, digits and underscores. New valid definitions can become available through proxy rarity immediately and synchronize; do not assume a legacy “restart required” hint applies to every rarity definition. Invalid definitions require fixing text or color.

/hdset rarity <rarityId> [itemId] (OP2) binds a rarity; /hdset rarity clear [itemId] removes a binding. Without an explicit item ID, the command targets the held matching NBT variant; with an ID, it targets the item-level fallback in item_rarities.json. Resolution order: matching variant → generic entry → item_rarities.json → original vanilla rarity. Clearing one level may reveal the next; it does not guarantee a white name. Rarity does not create a new registered quality item.

04Separate item registration

/hdui registry (OP4) manages registered entries; the three tabs of /hdui create do not register items. An entry references a source item and defines the new registered name, optional quality, use action, stack limit and resources. Entries are stored locally in config/healthy_diet/quality_registry/*.json. They produce new healthy_diet IDs only at startup. /hdreload can refresh the pending plan but cannot add an ID to an already running registry.

For multiplayer, distribute matching registry definitions and client resources and restart both sides following the registration process before distributing new items. A server hot reload alone is insufficient.