-
Notifications
You must be signed in to change notification settings - Fork 2
For Modpack Developers
Tip
All of LibTooltips' tooltips are driven through Translation Keys.
This means that if you wish to modify or add new tooltips all you need is to edit the language file (assets/minecraft/lang/en_us.json for english) and add your translations! LibTooltips will handle everything else.
In your translation file do something like:
"tooltip.minecraft.diamond.0" : "wow a fancy <ltrgb>RGB rainbow!</ltrgb>",
"tooltip.minecraft.diamond.1" : "You can add more lines by just simply doing .1 .2 etc!",

To add a tooltip all you need to do is add a key inside your translation file following this syntax:
"tooltip.minecraft.diamond.0" : "This is an example of a Tooltip!"


Every tooltip must start with tooltip.namespace.path.0. If you wish to add another line, you do tooltip.namespace.path.1 etc.
Similar to "shift" tooltips, add a translation key like so
"tooltip.always.minecraft.gold_ingot.0" : "This tooltip will always show, even without shift being pressed!"

##Available tags
Currently LibTooltips only comes bundled with the <ltrgb> tag! To add a new tag and text processor check the Mod Developer's wiki page.
LibTooltips will automatically add the [Shift] text. If you wish to change this text you need to overrite the following translation keys to whatever you wish to use instead.
"tooltip.libtooltips.generic.shift_up": "§7⏬ [Shift] ⏬",
"tooltip.libtooltips.generic.shift_down": "§7⏫ [Shift] ⏫",