Skip to content

Launcher M5a: mods, resource packs and shaders - #482

Merged
CheatCod merged 6 commits into
mainfrom
feat/launcher-content
Nov 8, 2026
Merged

CheatCod merged 6 commits into
mainfrom
feat/launcher-content

Conversation

@CheatCod

@CheatCod CheatCod commented Nov 8, 2026

Copy link
Copy Markdown
Member

Milestone 5a of Lodestone Launcher: the Mods tab becomes Content, with Mods, Resource packs and Shaders, managed the way the dashboard manages server mods.

What's in it

  • Content model:
    • Lists mods, resource packs and shader packs, as zips or folders, with their metadata and icons.
    • Provenance is kept in <instance>/content.json. Unknown files are matched to Modrinth by SHA-1 in one batched call.
    • Delete moves files to the Trash.
    • .mrpack export now lists Modrinth files by CDN URL instead of copying them into overrides.
  • Browse and install from Modrinth:
    • Search, sort and paging, with default filters for the instance's version and loader. Mods are client-compatible only.
    • Pasting a Modrinth link opens the project.
    • Version choice and required dependencies (up to 3 levels) follow the dashboard's rules.
    • Downloads come only from cdn.modrinth.com and are checked by SHA-1, size and SHA-512 before an atomic rename.
    • Updates and "Update all".
  • Enable, disable and order:
    • Mods use the .disabled suffix.
    • Resource packs are enabled, disabled and ordered in options.txt. Every other line is kept, and each pack gets a compatibility badge from pack_format.
    • Shaders are a radio list plus "Shaders off", written to Iris's config/iris.properties, Oculus's config/oculus.properties or OptiFine's optionsshaders.txt. Unknown keys are kept.
  • Shader mod:
    • The Shaders section detects Iris, Oculus or OptiFine.
    • If none is installed, it offers the right one for the loader and version: Iris + Sodium on Fabric/Quilt, Iris or Oculus on NeoForge, Oculus + Embeddium on Forge. Availability is checked live on Modrinth.
    • Vanilla instances get "Switch to Fabric".
    • OptiFine is never downloaded.
  • Locked while running: every change is locked while the instance is running, because the game rewrites options.txt and the shader configs when it exits.
  • Loader change in Settings: if enabled mods won't load on the new loader, Save lists them first. It offers "Turn them off and save" (reversible), "Save and keep them" or "Cancel", and warns about modded blocks in worlds.

Verification (local macOS arm64)

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings and cargo test --workspace pass: 298 tests. crates/lodestone-minecraft passes 48. All offline against a loopback Modrinth mock.
  • No new crates. The only lock change is one zip dependency edge (zip 0.6.6 was already locked). image's webp and gif features were already in the lock.
  • Live, against real Modrinth and a real game, on a Fabric 0.20.1 / 1.20.1 instance:
    • the Shaders offer installed Iris 1.7.6 and Sodium 0.5.12 as one plan;
    • Complementary Reimagined r5.9.3 installed and was selected, and iris.properties was written;
    • on launch, Iris logged Using shaderpack: ComplementaryReimagined_r5.9.3.zip and the game reached the menu;
    • content.json recorded the Modrinth project, version and hashes for each file.
  • UI: checked through offscreen renders of every new scene (content-mods, browse, project, resource packs, shaders, missing shader mod, vanilla, loader-change dialog).

Not yet: Markdown project bodies (there's a "View on Modrinth" link instead), .mrpack import, world backup and screenshots (M5b).

🤖 Generated with Claude Code

…r-core

Lists each content folder with the metadata that is cheap to read, remembers which
Modrinth version each file came from in the instance's content.json, matches unknown
files by SHA-1 in one batch, installs Modrinth versions with their required
dependencies (the dashboard's rules), edits the resource packs in options.txt and the
shader mod's selected pack, and offers Iris or Oculus for the instance's loader. The
.mrpack export now lists files that came from Modrinth by their CDN URL.
Mods are matched to the new loader by their metadata file: Quilt also loads Fabric
mods, Forge reads mods.toml and mcmod.info, NeoForge reads neoforge.mods.toml (and
mods.toml before 1.20.5). Jars without metadata are left alone. Adding a mod by hand
uses the same rule. Worlds in saves/ are counted so the Settings tab can warn about
them.
…shaders

Each section lists what is installed (with icons, versions, Modrinth matches, update
checks, enable/disable, resource pack order, the selected shader pack and delete to
the Trash) and browses Modrinth with the instance's version and loader as filters.
Files can be added with Add file... or dropped onto the list. The Shaders section
offers Iris or Oculus when the instance has no shader mod, and Switch to Fabric for
vanilla instances. Saving a loader change in Settings now asks first when enabled
mods won't load on the new loader or worlds may lose modded blocks, and can turn
those mods off. Preview scenes cover the new screens.
…nt.json entries, and look for updates once after the first listing
@CheatCod
CheatCod merged commit c89c111 into main Nov 8, 2026
@netlify

netlify Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for lodestone-dashboard failed. Why did it fail? →

Name Link
🔨 Latest commit 213bd5d
🔍 Latest deploy log https://app.netlify.com/projects/lodestone-dashboard/deploys/6af0296c25f3537059a57367

@netlify

netlify Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for lodestone-storybook failed. Why did it fail? →

Name Link
🔨 Latest commit 213bd5d
🔍 Latest deploy log https://app.netlify.com/projects/lodestone-storybook/deploys/6af0296c02bfb9a632eeab92

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