Repository navigation
Tooltips
One line per item – no appendHoverText overrides needed.
InfoTooltip.of(MY_SHELF.get())
.placeable() // "Can be placed"
.line("tooltip.mymod.fits_on_wall") // any extra gray line
.details(2) // "[SHIFT] for more" → 2 lines
.when(MyConfig::itemTooltips) // optional switch from your config
.register();details(n) reads the keys tooltip.<modid>.<item_path>.info_0 … info_{n-1} from your lang file:
"tooltip.mymod.shelf.info_0": "Right-click with an item to put it on the shelf.",
"tooltip.mymod.shelf.info_1": "Right-click with an empty hand to take it back."The generic texts (tooltip.foundation.canbeplaced, tooltip.foundation.hold_shift) come from Foundation.
TooltipBorder.markSoul(); // cyan, e.g. soul-fire food
TooltipBorder.markHot(); // orange-red, e.g. something hot
TooltipBorder.mark(0xF0FFD700, 0xF0886600); // any gradient (top, bottom), ARGBCall it while the tooltip is being built (e.g. inside a ClientTooltipEvent listener or appendHoverText).
The mark applies to the next tooltip frame only, so nothing needs to be reset.
Attribute lines (armor, toughness, knockback resistance, attack damage, attack speed, max health, movement speed) get a small icon in front.
Works for every item, vanilla and modded, nothing to register. Players can turn it off with enableAttributeIcons (Config).
Need the icons in your own tooltip lines? AttributeIcons.apply(lines) adds them to any list of components.
InfoTooltip lines only show while showItemInfo is on in Foundation's config, on top of your own when(...) switch. See Config.