fabric icon indicating copy to clipboard operation
fabric copied to clipboard

TooltipDataCallback to allow modders add their own tooltips to existing items

Open JumperOnJava opened this issue 2 years ago • 1 comments

I recently was developing feature that added "sell" and "purchase" tooltips for blocks with that functionality. The problem is that these toolips were added by different mods, one for selling, one for purchasing. And to make these mods compatible i had to develop small separate library, and package it to both mods. And i haven't even tested compatibility with other mods that may change tooltips. The only tooltip related events I found are for adding text lines to tooltip and registering tooltip component. So I propose new event the Fabric API - TooltipDataCallback(ItemStack, List<TooltipData>). Also i added three example mods to showcase what this can add (Fabric discord message link)

JumperOnJava avatar Nov 05 '23 06:11 JumperOnJava

Remvoed from last call, there are breaking changes between the two PRs, it might just be best to have one and make sure that all the behaviour is tested/defined.

modmuss50 avatar Jan 05 '24 15:01 modmuss50