Provismet / Tooltip-Scroll-Fabric

Simple client-side Minecraft mod that allows tooltips to be moved with the scrollwheel or keybinds.
MIT License
4 stars 7 forks source link

incompatibility with Legendary Tooltips #19

Open peow opened 9 months ago

peow commented 9 months ago

Type of Error

Incorrect Behaviour

Mod List

Legendary Tooltips v1.4.4 resourcepack: Origin Realms - Legendary Tooltips

Description

*Minecraft version actually is 1.20.1 but dont has this option

Legendary Tooltips makes it possible for Resource Packs to customize Tooltips, but the Tooltip Scroll mod doesn't recognize the customizations properly

image image

if you will fix this please make an update to fabric 1.20.1

Mod Version

v1.3.0

Minecraft Version

1.19.4 (Latest)

Mod Loader

Fabric

Steps to Reproduce

1) use Legendary Tooltips
2) try to use Tooltip Scroll

Crash Log

No response

Provismet commented 9 months ago

I've investigated the issue, but this is not something that I can easily fix from my end.

To explain:
Legendary Tooltips renders the decoration and shadow based on information granted from a non-standard event triggered when the tooltip is rendered. This event does not consider where a tooltip is actually positioned, but rather considers where it assumes the tooltip will be (thus it breaks when a different mod moves the tooltips).

The easiest solution would be to ask the Legendary Tooltips dev to add a compatibility API to their mod that lets mods like mine (and TooltipFix which works under the same logic, I believe) to move the tooltip decorations and shadows.

peow commented 9 months ago

ok, tx

Provismet commented 9 months ago

I'll keep this issue open for now because if the Legendary Tooltips dev does indeed implement an API entrypoint, then I will be able to act on it.

peow commented 4 months ago

possible workaround?

I discovered that the EMI mod (similar to REI) uses something called "TooltipPositioner" to always set the tooltip of an item to the left of the cursor, and this has been able to change the position of decorations added by Legendary Tooltips

with EMI: image

with REI (other item/recipe viewer) image

Maybe using this it will be possible to make the tooltip decorations follow the scroll

https://maven.fabricmc.net/docs/yarn-1.20-pre1+build.7/net/minecraft/client/gui/tooltip/TooltipPositioner.html