Draw the /ch chunks map as a dialog of chunk buttons - #32
Merged
Conversation
Chat renders a glyph grid differently on every client — font, chat width and scale all pull it out of shape. The map is now a multi-action dialog laid out at 2 * radius + 1 columns, so every chunk is a fixed-size button and the grid looks the same everywhere. Each button keeps the chat map's glyph, so the legend still reads, and adds a tooltip naming the chunk and, on the frontier, what it costs or how much credit is still missing. Clicking is read-only — it reopens the map with that chunk described at the top; chunks are still claimed by hitting the border. Servers too old for dialogs fall back to the chat map unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
Adds the dialog map's close button and six tooltips, plus the three ring keys the dialog body and the ring announcements use. Also completes the map legend, which stopped at the locked glyph and never got the center and you-are-here marks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
The map was building glyphs as legacy "&b◉" strings and, for the chat map, splicing a whole row of them into the [row] variable of a translation. With locale text moving to MiniMessage that is a bug waiting to happen: colour codes inside a MiniMessage line are not formatting, they are text. Pulls the grid out into ChunkMap, shared by the dialog and the chat fallback, and hands out glyphs as coloured Components. The chat map, which can only put text into [row], serializes those Components to MiniMessage instead. Dialog text now goes through User#getTranslationAsComponent rather than parsing the translation here, and the new dialog locale entries are written in MiniMessage. Verified both ways round: a MiniMessage row renders identically under a legacy "&a [row]" template and a MiniMessage one, so locale files already on disk keep working. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
BentoBox text is MiniMessage now; the &-codes still parse, but leaving
the files in the old format is what makes formatting bugs possible —
anything that has to build a fragment and put it into a translation has
to guess which format the line is in.
Converted with BentoBox's own Util.legacyToMiniMessage, so each value
now says exactly what the runtime was already rendering, then tidied up:
a straight conversion closes and immediately reopens a tag wherever the
old text repeated a colour code, which is every line of a multi-line
description.
Verified by rendering all 1582 values before and after and comparing the
style of every character: no value moved. Placeholder checks report the
same 47 pre-existing issues as before, none new.
Ten values across vi, tr, it, es, fr, uk and ja were left alone: they
contain a broken colour code ("& c", "&un", "& l") that never rendered
as colour and still doesn't. Worth a translator's eye, separately.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
Convert all locale files to MiniMessage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The chat map of
/ch chunksrenders differently on every client — font, chat width and GUI scale all pull the glyph grid out of shape. This makes the map a dialog instead: a multi-action dialog laid out at2 * radius + 1columns, so every button is a chunk and the grid is the same fixed-size boxes for everyone.What it does
panels/ChunksDialogbuilds the grid. Buttons keep the chat map's glyphs (■yours,▣claimable,□locked,◎center, aqua◆/◉/◇for the chunk you're standing on), so the existing legend still reads.chunks.info,chunks.ringsandmap.legend; the title reusesmap.title.Dialogs.isSupported()) or the build throws,show()returns false and the command falls through to the unchanged chat map.Locales
en-US.ymlgainschunkblock.chunks.dialog.*— a close label and five tooltips. Other locales are not synced yet.Tuning
MAX_RADIUS = 6(13×13 grid, vs 7 rings in chat) andBUTTON_WIDTH = 26are constants at the top ofChunksDialog; they were picked to fit the dialog screen and may want a nudge after more in-game use.Tests
New
ChunksDialogTestcovers the cell grid: kinds, frontier vs diagonal corners, growth outwards, the radius cap, you-are-here marking, glyph mapping and row ordering. Full suite green (668 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp