A simple item tooltip mod for Cosmic Reach (Puzzle Loader).
Why use this over the ones built into Cosmic Reach?
- Tooltips when hovering over items in catalog and inventory/containers
- Supports advanced tooltips with block id and blockstate info (Press f3 + h to toggle)
- Tooltips when selecting an item in the hotbar
- Fixes the spelling of aluminum
aluminium
->aluminum
(You can press f3 + b to undo this, if you hate yourself) - WAILA style display that shows the name and info of the block you're looking at
- Can show custom data from mods
Puzzle Loader only
This may seem complicated, but this is done to make sure that your mod will run fine without Cosmic Tooltips installed.
If you would like to add custom tooltips, add this to the dependencies
section of your build.gradle:
mod files('libs/CosmicTooltips-1.3.0-bundle.jar')
You will need to place the jar in the libs folder in the root of your project.
- Create a new class that implements
ITooltipItem
orITooltipBlock
then implement it's methods. - Override
getItemID
for items orgetBlockID
for blocks to return the id of the item or block you want to add a tooltip to. - Override
getTooltipText(Stack stack)
to return the tooltip text for the item or block.
- Create a new class that implements
ToolTipFactory
. - For every item or block you want to add tooltips to, put
addTooltip(new YOURCLASS)
in the constructor, where YOURCLASS implementsITooltipItem
orITooltipBlock
. - In your mod's
puzzle.mod.json
underentrypoints
add"tooltip": []
. - Add the path of the class that implements
ToolTipFactory
to"tooltip": []
. - Test your mod!
- PuzzleLoader
- ExampleMod
- SinfullySoul for better custom mod tooltip support