Custom Tooltip API
Data-driven tooltip text creation.
Custom Tooltip API
Custom Tooltip API
Custom Tooltip API is a fully client-side tool for developers, modpack creators, and players who want absolute control over item tooltips. This mod allows you to add custom lore, rarities, and great visual effects to any item's tooltip with ease.
No need to code for basic usage, as it features a powerful in-game interface and full JSON support. However, it also provides a robust Developer API for those who want to inject tooltips via code.
***
✨ Key Features
* Icon Alignment: Align tooltip icons from external resource packs to the start of the line so the position stays consistent! (Can toggle it on / off)
* Dynamic Detection: Target item groups via Tags (e.g., `#c:swords`) or specific IDs (e.g., `minecraft:diamond_sword`).
* Advanced Targeting: Apply tooltips to entire mods via Namespaces (`minecraft:*`), use Regex (`regex:.*_sword`), or target all items (`*`).
* Dynamic Placeholders: Embed real-time item data directly into your text using variables like `%max_durability%`, `%weapon_damage%`, or `%enchantments%`.
* Multi-line Support (Lore): Add entire paragraphs of lore or skill descriptions.
* Colors: * Colors: Animated rainbow effect. * Colors: Two-color gradients that flow through the text. * Colors: A smooth pulse between two colors. * Colors: Fixed gradients or traditional solid text. * Colors: Hex codes (e.g. `#RRGGBB`), legacy codes (e.g. `&d`) or Minecraft color names (e.g. `blue`).
* Replace All: Decide exactly where your text appears: * Replace All: Right below the item's name. * Replace All: At the very end of all descriptions. * Replace All: At the start of a specific line. * Replace All: At the end of a specific line. * Replace All: Swap the item's default name for your custom text. * Replace All: Completely clear the original tooltip and show only yours.
* Bold Full support for Bold, *Italic*, Underlined, ~~Strikethrough~~, and O̷͍̞͐͑b̷̻̌f̶̯̈u̸̲͗͐s̶̩̬͝c̵͎̊a̸̹̟̎ẗ̴͖̿e̴̟̪͊̈́ď̴̹̪ text.
* And more!
***
⚙️ In-Game Interface (GUI)
* Manage all your tooltips directly from the Mods Menu. No need to manually edit files unless you want to.
* Hold `CTRL` in the edit screen for an instant Live Preview of your tooltip.
***
🛠️ For Developers (API)
Developers can use the built-in API to register tooltips directly through code, bypassing the need for JSON files or user manual configuration.
* Check out the project's README.md file on GitHub! * A code example can be found here
***
📦 For Modpack Creators
The mod generates a `custom_tooltip_api/config.json5` file in your `config` folder. It fully supports code comments, making it incredibly easy to document your modpack's systems for your development team or community.
There's also a `custom_tooltip_api/fonts` folder where you can place custom fonts. The dynamically generated resourcepack needs to be enabled to make them work.
***
🧩 Dependencies
Required: * Required: * %%MD1%% * %%MD2%%