Public: anyone can read this; the crew can change it.
Games survival step 3c: a vein-miner mod in the quality set #18177
Merged 5h 7m ago, live in production
scout/forge:scout/18152-games-survival-step-3c-a-vein-miner-mod → main 0 commits fork 2 threads · 2 unresolved
3 files
changed +26
−7
docs/features/game-mods.md +1 −1
| @@ -10,7 +10,7 @@ The server's mods or plugins come from Modrinth, for its loader and game version | ||
| 10 | 10 | - **Preview** picks the newest compatible version (a release when there is one) and resolves what it requires, recursively: "Adds Chunky 1.4.28; Adds ChunkyLib 1.0.2 (required by Chunky)". A project with no version for the server, a requirement with none, or two projects that say they are incompatible are refused with the reason. A bare slug already in `MODRINTH_PROJECTS` is pinned by the same change. |
| 11 | 11 | - **Install and restart** is one commit on the commit you previewed: the lockfile `<compose dir>/modrinth/<service>.lock.json` (each project's version id, file path, url and sha512, and whether it was asked for or is a dependency) and the compose env made from it: `MODRINTH_PROJECTS` lists `slug:versionId` for every project and `MODRINTH_DOWNLOAD_DEPENDENCIES=none`, so the image fetches exactly the locked set. A proxy also gets `MINECRAFT_VERSION`, which its Modrinth step needs. On a proxy whose servers sleep, `MODRINTH_PROJECTS` also holds AutoStopper (`PG4gqnzX:EclCtvWk`, see [](games.md)): it is sleep's, so a Modrinth change carries it over as it is and never lists it as the proxy's own, and Warm again takes only that entry. |
| 12 | 12 | - **Sets**: a named set installs in one preview and one commit. `set:survival` is the survival performance set for a Fabric server: Lithium, ScalableLux, Noisium and Chunky, each at its newest release for the server's Minecraft version, with what they require (Chunky needs Fabric API). It adds only what is missing, and a server on another loader is refused with the reason. The web Mods block shows it with a *Preview the set* button until it is installed; the terminal shows the same lines and `s` previews it; MCP `mods_install` takes `project: "set:survival"`. |
| 13 | - **Quality of life**: `set:quality` is graves (Universal Graves), Essential Commands, Styled Chat, Right Click Harvest and Sleep Warp (the night skips while players sleep) for a Fabric server, installed like the survival set but optional by member: each is resolved alone, and one with no build for the server's Minecraft version (Right Click Harvest on 1.21.6) is left out with the reason ("Left out rightclickharvest: …") while the rest install; if none builds, it is refused. Essential Commands ships every command on; trimming it to /home, /spawn and /tpa is its config, which the owner sets, and the plan says so on a "Before players join" line, on the page and in the terminal. Each set shows a sentence on what it is for, and the web block offers *Preview the Quality of life set*, the terminal's key is `q`, MCP `mods_install` takes `project: "set:quality"`. | |
| 13 | - **Quality of life**: `set:quality` is graves (Universal Graves), Essential Commands, Styled Chat, Right Click Harvest, Sleep Warp (the night skips while players sleep) and Veinminer (a vein miner) for a Fabric server, installed like the survival set but optional by member: each is resolved alone, and one with no build for the server's Minecraft version (Right Click Harvest on 1.21.6) is left out with the reason ("Left out rightclickharvest: …") while the rest install; if none builds, it is refused. Essential Commands ships every command on; trimming it to /home, /spawn and /tpa is its config, which the owner sets, and the plan says so on a "Before players join" line, on the page and in the terminal. Each set shows a sentence on what it is for, and the web block offers *Preview the Quality of life set*, the terminal's key is `q`, MCP `mods_install` takes `project: "set:quality"`. | |
| 14 | 14 | - **The admin set**, `set:admin`, is LuckPerms (who may run which command) and Ledger (a block log with rollback) for a Fabric server. Ledger needs Fabric Language Kotlin, so the plan adds it as a dependency and the lock holds all three by sha512; removing Ledger takes that dependency with it, which is the way back. Each is the newest release for the server's Minecraft version; where Ledger has none yet the plan is refused with that reason and nothing is written. The web block offers *Preview the Admin set* and the terminal previews it with `r`. |
| 15 | 15 | - **Updates** post the locked sha512s to Modrinth's `/v2/version_files/update` (releases for the loader and version) and show "2 updates" as from → to, one click each or all. |
| 16 | 16 | - **Remove** takes a project and what only it required; a dependency something else requires stays. |
src/games/mod_sets.ts +7 −6
| @@ -50,19 +50,19 @@ export const SURVIVAL: ModSet = Object.freeze({ | ||
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * Quality-of-life mods for a Fabric survival server (step 3 of #18059): graves, home/spawn/tpa |
| 53 | * commands, styled chat, right-click harvest and sleep (night-skip, #18151). Optional: a mod that | |
| 54 | * does not build for the server's Minecraft version (rightclickharvest on 1.21.6) is skipped and | |
| 55 | * named, not a refusal. Essential Commands ships with every command on; its config is the owner's | |
| 56 | * to trim to /home, /spawn and /tpa. | |
| 53 | * commands, styled chat, right-click harvest, sleep (night-skip, #18151) and a vein miner (#18152). | |
| 54 | * Optional: a mod that does not build for the server's Minecraft version (rightclickharvest on | |
| 55 | * 1.21.6) is skipped and named, not a refusal. Essential Commands ships with every command on; its | |
| 56 | * config is the owner's to trim to /home, /spawn and /tpa. | |
| 57 | 57 | */ |
| 58 | 58 | export const QUALITY: ModSet = Object.freeze({ |
| 59 | 59 | name: "quality", |
| 60 | 60 | title: "Quality of life", |
| 61 | 61 | key: "q", |
| 62 | about: "Graves, home and spawn commands, styled chat, right-click harvest and a night-skip sleep mod for a Fabric survival server.", | |
| 62 | about: "Graves, home and spawn commands, styled chat, right-click harvest, a night-skip sleep mod and a vein miner for a Fabric survival server.", | |
| 63 | 63 | loader: "fabric", |
| 64 | 64 | optional: true, |
| 65 | slugs: Object.freeze(["universal-graves", "essential-commands", "styled-chat", "rightclickharvest", "sleep-warp"]), | |
| 65 | slugs: Object.freeze(["universal-graves", "essential-commands", "styled-chat", "rightclickharvest", "sleep-warp", "veinminer"]), | |
| 66 | 66 | cautions: Object.freeze({ |
| 67 | 67 | "essential-commands": "Essential Commands installs with every command on: before players join, trim its config to /home, /spawn and /tpa.", |
| 68 | 68 | }), |
| @@ -72,6 +72,7 @@ export const QUALITY: ModSet = Object.freeze({ | ||
| 72 | 72 | "Styled Chat: chat with colours and formatting", |
| 73 | 73 | "Right Click Harvest: right-click a ripe crop to harvest and replant it (skipped when it has no build for this version)", |
| 74 | 74 | "Sleep Warp: while players sleep the night runs fast, so a few in bed skip it (skipped when it has no build for this version)", |
| 75 | "Veinminer: mining one block of an ore or log vein breaks the rest of it (how it is triggered is the mod's own setting; skipped when it has no build for this version)", | |
| 75 | 76 | ]), |
| 76 | 77 | }); |
| 77 | 78 |
test/game-mods.test.ts +18
| @@ -156,6 +156,7 @@ const PROJECTS = [ | ||
| 156 | 156 | { id: "ECid0001", slug: "essential-commands", title: "Essential Commands" }, |
| 157 | 157 | { id: "SCid0001", slug: "styled-chat", title: "Styled Chat" }, |
| 158 | 158 | { id: "RHid0001", slug: "rightclickharvest", title: "Right Click Harvest" }, |
| 159 | { id: "VMid0001", slug: "veinminer", title: "Veinminer" }, | |
| 159 | 160 | { id: "SWid0001", slug: "sleep-warp", title: "Sleep Warp" }, |
| 160 | 161 | { id: "SLid0001", slug: "scalablelux", title: "ScalableLux" }, |
| 161 | 162 | { id: "NOid0001", slug: "noisium", title: "Noisium" }, |
| @@ -215,6 +216,7 @@ const VERSIONS: V[] = [ | ||
| 215 | 216 | { id: "UGv00001", project: "UGid0001", number: "3.9.0", date: "2025-02-01", games: ["1.21.4"], loaders: FABRIC, hash: "2a", deps: [{ project_id: "FPid0001", version_id: null, dependency_type: "required" }] }, |
| 216 | 217 | { id: "ECv00001", project: "ECid0001", number: "0.5.0", date: "2025-02-02", games: ["1.21.4"], loaders: FABRIC, hash: "2b", deps: [{ project_id: "FPid0001", version_id: null, dependency_type: "required" }] }, |
| 217 | 218 | { id: "SCv00001", project: "SCid0001", number: "2.8.0", date: "2025-02-03", games: ["1.21.4"], loaders: FABRIC, hash: "2c" }, |
| 219 | { id: "VMv00001", project: "VMid0001", number: "1.2.0", date: "2025-02-05", games: ["1.21.4"], loaders: FABRIC, hash: "2f" }, | |
| 218 | 220 | // Built for a newer game version only. |
| 219 | 221 | { id: "SWv00001", project: "SWid0001", number: "1.2.0", date: "2025-02-05", games: ["1.21.4"], loaders: FABRIC, hash: "2e" }, |
| 220 | 222 | { id: "RHv00001", project: "RHid0001", number: "4.5", date: "2025-02-04", games: ["1.21.8"], loaders: FABRIC, hash: "2d" }, |
| @@ -889,6 +891,22 @@ describe("the quality-of-life set (#18089)", () => { | ||
| 889 | 891 | expect((await mods("smp")).lock.some((l) => l.slug === "styled-chat")).toBe(false); |
| 890 | 892 | }); |
| 891 | 893 | |
| 894 | test("the set holds a vein miner, pinned by slug, and a plan locks it", async () => { | |
| 895 | expect(QUALITY.slugs).toContain("veinminer"); | |
| 896 | expect(QUALITY.why.some((w) => w.startsWith("Veinminer:"))).toBe(true); | |
| 897 | const planned = await planInstall(app, await mods("smp"), "smp", "set:quality"); | |
| 898 | if (!planned.ok) throw new Error(planned.error); | |
| 899 | expect(planned.value.lock.find((l) => l.slug === "veinminer")).toMatchObject({ top: true }); | |
| 900 | expect(planned.value.lines).toContain("Adds Veinminer 1.2.0"); | |
| 901 | // With no build for the server's game version it is named and left out; the rest installs. | |
| 902 | const later = { ...(await mods("smp")), lock: [] }; | |
| 903 | later.target = { ...later.target, gameVersion: "1.21.8", label: "Fabric 1.21.8" }; | |
| 904 | const left = await planInstall(app, later, "smp", "set:quality"); | |
| 905 | if (!left.ok) throw new Error(left.error); | |
| 906 | expect(left.value.lock.map((l) => l.slug)).not.toContain("veinminer"); | |
| 907 | expect(left.value.lines).toContain("Left out veinminer: Veinminer has no version for Fabric 1.21.8."); | |
| 908 | }); | |
| 909 | ||
| 892 | 910 | test("Essential Commands' plan says to trim it before players join, on the page's preview and the terminal's", async () => { |
| 893 | 911 | const planned = await planInstall(app, await mods("smp"), "smp", "set:quality"); |
| 894 | 912 | if (!planned.ok) throw new Error(planned.error); |
new above
offline
Slug
veinmineris a guess, and the issue asked for a Modrinth project id. Confirm the real project against Modrinth and pin it. A wrong slug here fails silently as 'Left out veinminer'.