Skip to content

For Modpack Developers

wd edited this page Oct 22, 2025 · 8 revisions

Tip

All of LibTooltips' tooltips are driven through Translation Keys.

This means that if you wish to modify or add new translation keys all you need is to edit an existing en_us.json (or whatever other language you want!) or make your own through a resourcepack as usual!

How to use

In your translation file do something like:

  "tooltip.minecraft.diamond.name" : "<rgb>Diamond!</rgb>",
  "tooltip.minecraft.diamond.0" : "wow a fancy <rgb>description!</rgb> very <gradient-03>cool</gradient-30> description me thinks.",
  "tooltip.minecraft.diamond.1" : "You can add <rgb>more lines</rgb> by just simply doing .1 .2 etc!",
  "tooltip.minecraft.diamond.2" : "<gradient-30>You can define a gradient like this!</gradient-60>",
  "tooltip.minecraft.diamond.3" : "The 30 and 60 refer to a scale from 00 to 99 for the hue.",
  "tooltip.minecraft.diamond.4" : "",
  "tooltip.minecraft.diamond.5" : "You can make a 'line break' by just leaving the translation empty like this.",

  "tooltip.minecraft.diamond.7" : "skipping a number will stop the tooltip 'cycle', so don't do that. this text will never be rendered",
  "tooltip.minecraft.diamond.8" : "This works with any item or block, not just your mod or vanilla!"

output2

Adding a Tooltip to an Item

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!"

image image

Every tooltip must start with tooltip.namespace.path.0. If you wish to add another line, you do tooltip.namespace.path.1 etc.

Adding a custom name to an Item

You may also change the name of the item using tooltip.namespace.path.name like so:

"tooltip.minecraft.diamond.name" : "Super Shiny Diamond!"

image

This will only change the name when hovering the inventory, other UIs might not respect it and will instead default to the normal name.

Adding colors!

If you wish to add colors to your tooltips or item names, all you need to do is use the <rgb> and <gradient> tags!

"tooltip.minecraft.diamond.0" : "This text <rgb>will be RGB</rgb> now!"

output

"tooltip.minecraft.diamond.0" : "This tooltip has a nice <gradient-00>red-orange gradient</gradient-10>. wow!"

output

Editing the [Shift] text

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": "⏬ §l§3[Shift]§r ⏬",
  "tooltip.libtooltips.generic.shift_down": "⏫ §l§6[Shift]§r ⏫",

Clone this wiki locally