HyBaubles-1.2.1.jar
What's new
## 1.2.0
Baubles keep what is written on them, every mod's baubles can be equipped at once, and the screen
shows enchantments and rarity.
### Features
- **Bauble slots store the whole item, not just its id.** A bauble now keeps its durability, its
enchantments and anything else another mod has written onto it while it is equipped, and those ride
along with it in and out of the slot. This is what makes a wear-based bauble possible at all: under
the old id-only storage a durability ring came back out of a slot brand new.
Saves written before 1.2.0 are migrated on load. The old id array is still written alongside the new
one, so a world can be moved back to 1.1.0 without losing which baubles were equipped.
- **Durability bars in the bauble screen.** Slots now show wear, using the same green-through-red
ramp as the inventory squares. A full bar is hidden, so a slot only shows wear once there is some.
- **Enchantments in the bauble tooltip.** Another mod's per-item text now appears. Simple Enchantments
composes the item description plus its enchantment block onto the stack, and the screen replaced the
native tooltip without reading it, so enchantments were invisible here. The screen now uses the
stack's own description when it has one, which keeps that mod's colours and formatting and works for
any mod that writes display metadata rather than only for one.
- **Rarity on the name line.** The item's rarity name is drawn at the right edge of the name line,
padded to the same measured width as the rest of the tooltip, and deliberately not bold.
- **The screen updates while it is open.** A custom page is built once and then only redraws when you
click something, so wear, pickups and moves left it stale. It now re-sends itself when the equipment
or the inventory actually changes, and not otherwise.
- **Creative menu subsection.** `Rings` can host subcategories, so an addon can add its own section
beneath it rather than needing a top-level tab.
### Fixes
- **Only one mod's baubles could be equipped.** The bauble asset store fires one `LoadedAssetsEvent`
per asset pack, each carrying only that pack's files, and the runtime registry was rebuilt from that
payload with `replaceAllParsed`. Every pack therefore wiped the previous pack's definitions and the
last mod to load won — with three mods shipping baubles, the other two mods' items, **including
HyBaubles' own**, became unequippable. The registry is now rebuilt from the whole asset store, which
still honours deletion because a removed file is simply absent from the map.
- **Equipping a bauble destroyed its enchantments.** Both the screen and `/baubles` rebuilt items as
`new ItemStack(id, 1)`, which discards durability, enchantments and metadata. They now move the item
itself.
- **The tooltip's rule and the durability readout did not line up.** Both are now sized from the same
measurement of what the tooltip will contain, rather than from a fixed character count.
### Changes
- **The tooltip is narrower** — its maximum text width drops from 540px to 432px, so descriptions wrap
earlier and the panel takes less of the screen.
- **Tooltip text is measured, not guessed.** Widths come from the client's own font metrics, read from
`NunitoSans-Medium` for body text and `NunitoSans-ExtraBold` for bold. Those two are the faces the
client loads — they are the only ones shipping the atlas the renderer needs — which is also why the
name and the rarity label are measured separately.
### Limitations
- **Text measurement outside ASCII is approximate.** The tooltip switches font per language (Noto for
Cyrillic and CJK), so those advances cannot come from one face. Latin-1 and Cyrillic use a
documented fallback and CJK a fixed full width, so a non-English client may see the rule and the
durability readout sit a little short or long.
- **A description assembled purely from translation spans cannot be measured.** It falls back to the
rule's width, which is safe (short) rather than wrong.
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

