
Item Tooltips
A simple, configurable mod which allows you to dynamically add item descriptions to any vanilla or modded item.
Available for both Fabric & Neoforge.
Tagging Items for Descriptions
Simply add any blocks / items you'd like to add descriptions to to the #item_tooltips:has_description
tag. The translation keys simply add a ".desc" onto the end of the original item name, as with other existing enchantment description mods.
For example, the description translation key for the Totem of Undying, if tagged in #item_tooltips:has_description
, would be item.minecraft.totem_of_undying.desc
Details on description config options can be found further below.
Wrapping Text
Item Tooltips adds text wrapping (ported from Adaptive Tooltips / Better Tooltips), which automatically moves descriptions to the next line should text get too long.
Details on tooltip config options can be found further below.
Use in Modpacks
Item Tooltips can serve as a handy utility mod for modpack development. Simply add any items you want to the tag, write a translation, and you're good to go! For this purpose, I'd suggest a mod such as Simple Resource Loader in order to load your custom data/resources.
An example datapack and resourcepack format can be found here.
Configuration
Item Tooltips has a configuration file located at config/item_tooltips.json5
If Mod Menu is installed on Fabric, you can also edit the config file in-game.
Descriptions
add_descriptions
- defaults to true
. Dictates whether item descriptions are added to tagged blocks / items. This can be disabled should you only want the tooltip wrapping functionality.
require_shift
- defaults to true
. Indicates whether or not the shift key must be held for item descriptions to be shown.
shift_notice
- defaults to true
. Indicates whether or not there should be a small tooltip indicating to the player to hold the shift key on items with a description.
color
- the decimal colour value of displayed tooltips. The default value is 5592405
prefix
- empty by default, the contents of this string are added before any description, for example, this could be used to add indentation or a plus symbol before all item descriptions
prefix_color
- the decimal color value of displayed tooltip prefixes. The default value is 13027014
If you'd like help picking colors, a good hexadecimal to decimal converter can be found here.
Tooltips
wrap_text
- defaults to true
. Whether text should be wrapped. You can disable this if you have another mod which handles text wrapping.
length
- a static number value which dictates the maximum length of a tooltip before wrapping. When disabled, wrapping relies solely on the length cap. Defaults to -1
length_cap
- the percentage length of the game window a tooltip will cover before wrapping. This also serves to cap the static length config value, should it get too long. Defaults to 50
Depending in a Mod
You may depend on / integrate with Item Tooltips within your own projects. Make sure to change the version number and modloader to the correct ones in your gradle.properties
build.gradle
repositories {
maven { url = "https://api.modrinth.com/maven" }
}
dependencies {
modImplementation("maven.modrinth:item-tooltips:$tooltips_version")
}
gradle.properties
tooltips_version=1.21.1-v1.0.0-fabric
gradle.properties
tooltips_version=1.21.1-v1.0.0-fabric