mojira.dev
MC-75699

Villager restock hover text is not automatically wrapped making it cut off at edge of screen

The bug

The hover text shown when a villager has to restock a trade is not wrapped into the next line when it is too long. Instead it extends past the edge of the screen and therefore cannot be read.

[media]

Reproduction steps

  1. Trade with a villager until the trade is used up

  2. Hover over the red crossed out arrow
    ❌ The hover text is cut off at the edge of the screen

Note: You might have to adjust the GUI scale or change the window width to reproduce this issue. Additionally it might be easier to see for languages which have a longer translation for this text.

Attachments

Comments 9

Confirmed for 1.13.1. (I used the language German)

Confirmed for 19w12b.
This issue is aggravated by the newly added usage of tooltips in the villager trading GUI. Not only is it a huge inconvenience for language translations, even in English it barely fits on the screen (see attached screenshot).

Perhaps a solution would be to add a margin that the tooltip could lie within. When the left edge of the tooltip box is lower than the margin, it gets "locked" to that position and expands to the right instead (a similar "rule" was added as the fix for MC-11654; more specifically, if the tooltip is too long to be displayed at the right of the mouse cursor, it gets shifted to the left side instead).

This would, however, only postpone the problem, not solve it completely, as long enough text would again overflow the right edge of the screen. But it would remedy it by allowing many more characters to be displayed, as the full width of the screen would be utilized.

Can't reproduce in 1.16.2 rc1 - the text is split into lines

Can reproduce with villager restock message, but not other means

I have updated the report to only describe the villager restock hover text since that was originally affected as well. Additionally I have created MC-197476 which describes cases where the text is wrapped, but not at the ideal position.

Attached a screenshot wherein this happens with a warning not to load the world for older versions hover text. Happened in 1.16.5.

@@unknown, could you please create a separate report for this (after verifying that no report exists yet) and remove the screenshot from this report? We will then mark your report as related.

This issue has likely been fixed in 22w42a following the fixes of MC-197476 and MC-26757.

Thanks @unknown, yes to me this looks fixed in the sense that the hover text is positioned better (might still not be wrapped though, but that is probably not an issue?). For all these hover text related issues Minecraft now seems to move the hover text to left border of the screen when there would otherwise not be enough space.

marcono1234

(Unassigned)

Confirmed

UI

hover, hoverEvent, line-break, linebreak, screen, text

Minecraft 1.8.1, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 1, Minecraft 1.13.1, Minecraft 19w12b, 1.15.1, 1.16.2 Release Candidate 1, 1.16.2

22w42a

Retrieved