mojira.dev
MC-313669

`split_lines: true` in `minecraft:tooltip_display` does not wrap lines in `show_item` hover events

The Bug

When an item has a long line of text (such as a long minecraft:lore entry or a translate text component) and uses minecraft:tooltip_display with split_lines: true (the default behavior in 26.4 Pre-Release 2), the tooltip lines automatically wrap properly when hovering over the item in an inventory GUI.

However, when the exact same item is displayed via a chat hover_event with action: "show_item", the text is not split or wrapped at all and renders as a single excessively long line.

Steps to Reproduce

  1. Run the following command in chat to give yourself an item with a long lore line and split_lines: true:

    /give @s stone[tooltip_display={split_lines:true},lore=['"This is a very long line of text inside the item lore that should automatically wrap onto multiple lines when hovered over."']]
  2. Open your inventory and hover over the stone item.
    -> Notice that the lore line automatically wraps into multiple lines.

  3. Place a command block, paste the following command into it, and activate it (as it exceeds the 256-character chat limit):

    /tellraw @p {"text":"[Hover over me]","hover_event":{"action":"show_item","id":"minecraft:stone","components":{"minecraft:tooltip_display":{"split_lines":true},"minecraft:lore":["This is a very long line of text inside the item lore that should automatically wrap onto multiple lines when hovered over."]}}}
  4. Open chat and hover over [Hover over me].

Observed Behavior

The tooltip renders the lore as a single, unwrapped horizontal line that extends far across the screen, completely ignoring split_lines: true.

Expected Behavior

The show_item hover event tooltip should respect minecraft:tooltip_display (split_lines: true) and wrap long lines onto multiple lines just like inventory tooltips do.

Linked issues

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

This issue is already being tracked in MC-313561, so I have resolved this report as a duplicate. (This report was better and more up-to-date, but the MC-313561 already has a priority assigned, so I rewrote it to bring it up to speed.)

G4bc

(Unassigned)

Unconfirmed

26.4 Pre-Release 2

Retrieved