Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-145076

Autocomplete suggestions in chat or command blocks may go outside of screen for too long names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.2, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11b, Minecraft 19w12b, Minecraft 19w13b
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      If your GUI scale is large enough, and the autocomplete for a certain command typed in chat (or a command block) contains a suggestion that's long enough, the suggestion box will go beyond the left edge of the screen, preventing you from reading the first characters of each suggestion. Too short suggestions may even disappear from the screen entirely.

      How to reproduce

      1. Type the following command in the chat:
        /advancement grant @p only
        
      2. Press space
        The autocomplete suggestions for the <advancement> parameter will go beyond the left side of the screen

      In this case, the name that makes the autocomplete box too long to be displayed on screen (understandably, because even here it may be displayed in two lines) is the following:

      minecraft:recipes/building_blocks/smooth_red_sandstone_stairs_from_smooth_red_sandstone_stonecutting
      

      However, it may happen with any function name, sound event, block tag, advancement etc. that's long enough (along with a large enough GUI scale).

      Suggested fix

      The suggested fix is to make it behave it similar to chat messages: calculate how many characters can fit on the player's screen, considering their screen resolution and GUI scale, then break the names that exceed this length into two or more lines. To avoid splitting lines in the middle of a word, line breaks can happen after slashes or underscores, if possible.

        Attachments

        1. 1.png
          1.png
          216 kB
        2. 2.png
          2.png
          218 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Bentroen Bentroen
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: