AHilyard / LegendaryTooltips

A mod for Minecraft that adds fancy tooltips for rare items as well as tooltip customization options.
Other
26 stars 15 forks source link

[1.19.4 Fabric] Tooltip name separator renders in the wrong position and different locations depending on Iceberg version #113

Open kristofbolyai opened 10 months ago

kristofbolyai commented 10 months ago

I have originally wanted to fix this, rather than creating an issue. However I ran into issues I need your help with.

I set up the development environment, and fixed (I think) the bug with Iceberg 1.1.8 (as it is the version required by the build script). See https://github.com/kristofbolyai/LegendaryTooltips/commit/d08ecec774c11c3215351ff507b70d429528ab1e.

With the fix applied, on Iceberg 1.1.8, the tooltip name separator looks correct: image

Then I loaded into Iceberg 1.1.9.1, to test. The tooltip now renders incorrectly again (but this version accidentally fixes(?) the bug without my fix). image

I have went ahead to track the issue down. It seems like com.anthonyhilyard.legendarytooltips.tooltip.TooltipDecor#drawBorder is called with different x values in the different Iceberg versions. This is most likely caused by https://github.com/AHilyard/Iceberg/commit/b35061a82bed88966b6efdab39fc3c5b11cb0267#diff-9f8609ea0ddf40b8bc92a95fce6270087d168bc69011dc3c5d739d389c72be93.

Can you help me out with some info regarding this? From what it looks like, and the comment above the code part I fixed, it seems like my fix should be correct. But I am not sure anymore.

All item screenshots were recorded on the Wynncraft server.

(I have originally started looking into your mod since the mod I am working on has a weird interaction with this mod, related this name separator. However, before addressing that, I would like this to be cleared up.)