-
Notifications
You must be signed in to change notification settings - Fork 2
For Mod Developers
LibTooltips is hosted on Favouriteless' Maven! Thank you so much <3
Warning
🏗️ LibTooltips is currently only available for Neoforge 1.21.1!
If you wish to add the library to your mod, I highly recommend you use the jar-in-jar system as the library is really tiny and it's not worth the annoyance of making players download it seperately.
To do so, first add Favouriteless' Maven repository into your build.gradle's repositories section like so:
repositories {
maven {
url = "https://maven.favouriteless.net/releases"
}
}
After adding the repository, you can then add LibTooltip as a jar-in-jar dependency, like so:
dependencies {
jarJar(implementation(group: 'com.wdiscute', name: 'libtooltips')) {
version {
// Version used in your workspace and bundled in mod jar
prefer '1.2'
}
}
}
Now all you need to do is reload gradle and you should have access to LibTooltip!
There is only one class (excluding the config) which is under com.wdiscute.libtooltips
LibTooltip's methods are all public so you are free to use them for anything you wish.
For example, if I wanted to use the text this is in <rgb>RGB!</rgb> in my UI I could call Tooltips#decodeString which would return me a Component for me to use however I want.
Ready to add your tooltips through translation keys now? Head over to the Modpack Developers area!