Feature Client Options Screen - bh679/dungeon-train-mc GitHub Wiki
Home > Features > Client Options Screen
Since: v0.684.0 (PR #1137)
The "Dungeon Train…" button on vanilla's Options screen — reachable from both the main-menu Options and the Esc/pause Options — opens a tabbed settings screen built on Minecraft's own OptionsSubScreen.
Before this change the screen was a single hand-laid-out column starting partway down the window. Eleven-plus rows did not fit: at a small window size or a high GUI Scale, the bottom rows — and the Done button with them — ran off-screen with no way to reach them.
The screen is now three tabs, each holding its own scrolling list with Done pinned in the footer:
| Tab | Rows |
|---|---|
| General | Content, Political Filter (Chinese-language clients only), Book Author Chat, Cinematic Hotkey, Help Translate… (when a translation target resolves) |
| Train | Train Engine Volume, Custom Train Content, Snapshot Max Resolution, Snapshot Chat Log, Catch-up Spawning (hidden on a multiplayer client) |
| Editor | All Displays / Worldspace / HUD display-scale sliders, plus where each of the four editor menus (X/V/C/Z) draws — see worldspace vs. screenspace, and Mod Block Tabs / Mod Blocks in Search — whether the biome mods' creative tabs and their search entries are shown (both off by default, v0.1100.0) |
The selected tab persists across closing and reopening the screen. Settings pair two-to-a-row where their caption fits a 150px column; a caption too long for that (e.g. "Snapshot Max Resolution: 2160p") takes a full-width row instead of scrolling its own text. Because that measurement uses the translated caption, the same row can be narrow in English and full-width in a language with longer words.
Chooses how fast an end of the train re-extends once it has fallen behind the carriages you need around you — Automatic (the default), Off (one group at a time), Burst 2, or Fill all. It applies immediately to the train you are already riding; the spawner re-reads it at the moment it decides each spawn, so there is nothing to reload.
It is a single global setting, stored in config/dungeontrain-common.toml rather than per-save, so it can be changed with no world open and one value covers every world. It is therefore the one Train row present on the title screen as well as in a world; it is hidden only on a multiplayer client, where the value that applies is the server's own.
Automatic picks one of the other three from the machine actually running the game — on a dedicated server, the server's own specs, not any player's. The row names what it chose, e.g. "Automatic (Fill all)", and the resolution is written to the log with the numbers behind it.
CPU cores decide the pacing, because what separates the modes is whether a carriage group's ~30 ms spawn fits inside the tick alongside a server baseline near 26 ms. Memory only ever lowers the result, and only when genuinely short: the modes differ in the rate carriages are added, not in how many end up resident, so a large heap is not a reason to spawn faster.
| Machine | Resolves to |
|---|---|
| 8+ cores, ≥ 3 GB heap, ≥ 8 GB RAM | Fill all |
| 4–7 cores | Burst 2 |
| under 4 cores | Off |
| heap under 3 GB, or physical RAM under 8 GB | steps down one |
| heap under 2 GB | Off |
| specs unreadable | Fill all (the pre-Automatic behaviour) |
A typical modpack install — 8 cores with the launcher's common 4 GB allocation — still gets Fill all.
The thresholds are reasoned rather than measured: the per-group cost and the tick baseline are measured, the relation between core count and real-world stutter is not. That is why the resolution is logged.
Until v0.778.0 the setting lived in the per-save server config, which meant the row appeared only while a singleplayer world was open — at the title screen it was silently absent. A per-world value set before v0.778.0 was not migrated and reverted to Fill all.
v0.780.0 made Automatic the default and added a migration: an install still on Fill all — the old shipped default, so almost certainly never chosen — moves to Automatic, while a deliberate Off or Burst 2 is kept. A deliberate Fill all cannot be told apart from an untouched one and is also moved; on a capable machine Automatic resolves to Fill all regardless.
The Editor tab's display-scale sliders and the four menu-space rows used to live behind a separate "Editor Settings…" sub-screen; that screen is gone and its content is inlined directly onto the Editor tab, so the same settings are one click away instead of two. The scales are now OptionInstance sliders rather than [-] / [+] steppers, on the same step granularity as the in-world X-menu's own steppers so the two surfaces can't disagree.
Since PR #1938 every row is one line of a settings list rather than a 150px button carrying its whole meaning in its label: a 16px icon (vanilla items and sprites the mod already ships, Edible Backpacks' own backpack for its button), the setting's name, a one-line grey hint, and a control on the right that shows only its value — ON, Adult, 80%, 720p, Open, Clear. Sliders show just their number. Hovering the name or hint shows the full explanation; the controls carry no tooltip of their own. Hints that outgrow their room in a locale end in "…".
The two-across packer and its label-width measuring are gone: SettingsRowList (a ContainerObjectSelectionList) replaces vanilla OptionsList in every tab, the control is the entry's only child (clicks, focus, Ctrl+Tab and narration stay vanilla), and ClientOptionsIcons maps each ClientOptionsTab.Row to its icon. Each row names itself through Row.captionKey(); its hint is <captionKey>.hint and its tooltip <captionKey>.tip, all translated in the 21 locales. The Backups tab's three Dungeon Backup settings are value-only controls over BackupSettings (On / 5 / Clear, with the archive size in the Clear row's hint); Keep backups shows the current mode's own explanation on its label. Low Memory Warning moved from General to the top of the Performance tab. Four captions were trimmed: Photo resolution, Photo chat line, Engine volume, Other advancement tabs.
Since: v0.1150.0 (PR #1817)
A fifth tab, Performance, lists every lag tip the death screen's bug-report answer can give, worded for the player's setup: Distant Horizons, render distance, shader pack, ride-photo resolution, carriages loaded (singleplayer only) and memory allocated. Tips that would help come first under "Tips for a smoother ride"; the rest follow dimmed under "Other performance settings", so every setting can be found even when nothing needs fixing. Each has its button (Video Settings, Shader Packs, DH settings, Dungeon Train Settings, Lower resolution) or a grey hint (Not installed / Set in a singleplayer world / Set this in your launcher). When the player is behind, a last line says by how many releases, with See changes.
The tips come from LagTips.all(); the death-screen card and the chat answer still use LagTips.applicable(), the same list filtered to the tips that apply. PerformanceTipRow draws a tip as one full-width row (text left, button right, wrapping to two lines), since OptionsList's 150px pairing is too narrow for a tip.
Since v0.1154.0 (PR #1829) the Train tab's Snapshot Max Resolution (and the X menu's) offers 720p, the value Lower resolution sets, so it no longer reads AUTO afterwards; a hand-edited value off the ladder is shown as itself.
Since v0.1300.0 (PR #2022) the Performance tab also shows the Live Feed switches that cost frame rate, between the low-memory notice and the tips: Watch live feeds (viewingEnabled; off = TVs and the pinned viewer show static and no decoder runs), Livestreaming and Video size (broadcast width). They are the same rows as on the Stream tab, which also gained Watch live feeds. ClientOptionsTabTest allows exactly these three rows to appear in two tabs.
The Internet Connection row (master switch for network consent) is temporarily removed. It could be switched off but not back on in-game — this screen was the only place in Dungeon Train's source that opens the network-consent card, and the underlying card shows itself only once, at first launch. A player who has already answered has no in-game way to change that answer in either direction until the row returns. The lang keys are retained so restoring it is a code-only change.
-
DungeonTrainClientOptionsScreen.java— the screen: tab bar, per-tab scrolling lists, width-aware row packing -
ClientOptionsTab.java— the tab/row model, Minecraft-free and unit-tested -
PerformanceTipRow.java— one row of the Performance tab -
LagTips.java— the tips, shared with the death-screen card and chat answer -
DisplayScaleOption.java— the three display-scale channels asOptionInstancesliders
→ Editor floating panels for the worldspace scale this screen also controls · Command Menu for the X-menu's own Options submenu (a separate worldspace panel, unaffected by this change)