mojira.dev
MC-301271

Object text components do not render in some places unless there are text glyphs on the same line

The bug

This affects, at least, all text in dialogs and the server list MOTDs.

This does not affect chat, written books, signs, name tags, or text displays.

Steps to reproduce

  1. Run this command: /dialog show @s {type:"minecraft:notice",title:"",body:{type:"minecraft:plain_message",contents:\\["Line 1\\\\n",\\[{sprite:"block/grass_block_side"}\\],"\\\\n",\\["Line 3",{sprite:"block/grass_block_side"}\\]\\]}}

Expected Behaviour

The dialog body should say

  • “Line 1“;

  • Then, on a new line, a grass block side sprite on its own;

  • Then, on a third line, “Line 3“ followed by another grass block side sprite.

Observed Behaviour

Only the first and third lines appear. The lone sprite on the second line does not show up at all. This happens no matter how many object text components are on the second line, and adding a whitespace character does not affect the problem, only visible text makes it visible.

Environment

Java 21.0.7, Linux

Linked issues

Attachments

Comments 3

I can reproduce this issue. Notably if there are any normal glyph characters in that line of text then the sprites render as expected.

Can confirm in 1.21.9-pre1.

This explains why sprites have been rendering in my “number range” and “single option” inputs but not in action buttons-- It’s because of the colon. Thank you DorkOrc. I hope this is patched for 1.21.9

PALKIP

boq

Community Consensus

Platform

Normal

Commands, Rendering, Text, UI

25w34b

25w42a

Retrieved