mojira.dev
MC-260288

Soft-lock when Font queries width of localised text with no localisation

When querying the width of a `Component.translatable()` using a Font, if the translation key has no translation, the game soft-locks.

font.width(Component.translatable("key.without.translation"))

... soft lock.

 

 

Comments 5

How would this be triggered?

Please include instructions for reproducing this error using commands or a data pack, or note if this is a modded client. Thanks.

You could trigger this with `/title @s title {"translate":"doesnt_exist"}` because centering requires querying width, but this seems to have been fixed and can be closed.

Cannot reproduce in any version; using translate with a non-existing key has always shown the translation key.

Please provide new instructions if still a issue in 23w17 and beyond. Thanks!

isXander

(Unassigned)

Plausible

(Unassigned)

1.19.3, 23w07a

Retrieved