Skip to content

Render the territory map in a monospaced font - #23

Merged
tastybento merged 1 commit into
developfrom
feat/ring-milestones
Aug 10, 2026
Merged

Render the territory map in a monospaced font#23
tastybento merged 1 commit into
developfrom
feat/ring-milestones

Conversation

@tastybento

Copy link
Copy Markdown
Member

Follow-up to #22, which merged a few minutes before this commit was pushed — so this fix missed the boat rather than being a new change of direction.

Chat's default font is proportional, so the territory grid came out ragged: how far a row reached across the screen depended on which chunks happened to be claimed, which is the opposite of what a map is for.

The map rows now go out as components in minecraft:uniform, Minecraft's built-in fixed-width font. Only the rows change font — the title and legend stay in the normal chat font.

The row locale key is still used and still translatable: getTranslationAsComponent() resolves the legacy & codes via parseMiniMessageOrLegacy, and the font is set on the resulting component.

IslandChunksCommandTest reads the rows back out of the captured component and asserts the font is set, so this cannot be quietly reverted to a plain string without a test failing.

Verified in game on Paper 26.2: ■ ▣ □ ◎ ◉ ◆ all render single-width in unifont, so the grid comes out square.

🤖 Generated with Claude Code

https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp

Chat's default font is proportional, so a grid of mixed glyphs came out
ragged — how far a row reached across the screen depended on which chunks
happened to be claimed, which is the opposite of what a map is for. The rows
now go out as components in minecraft:uniform, Minecraft's built-in
fixed-width font, so the columns line up. Only the rows change font; the
title and legend stay in the normal chat font.

The row locale key is still used — getTranslationAsComponent() resolves the
legacy colour codes, and the font is set on the result.
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit ad46587 into develop Aug 10, 2026
3 checks passed
@tastybento tastybento mentioned this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant