[PR #2632] [MERGED] launcher: a skin and a cape for each offline name #4489

Closed
opened 2026-11-03 04:17:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2632
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-skins


📝 Commits (1)

  • b2199f5 launcher: a skin and a cape for each offline name

📊 Changes

10 files changed (+642 additions, -3 deletions)

View changed files

📝 docs/launcher-commands.md (+15 -0)
📝 launcher/README.md (+7 -0)
📝 launcher/src/account.rs (+20 -0)
📝 launcher/src/cli.rs (+77 -1)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+5 -0)
➕ launcher/src/skin_page.rs (+225 -0)
➕ launcher/src/skins.rs (+176 -0)
➕ launcher/src/skins/tests.rs (+104 -0)
📝 launcher/src/switch_page.rs (+12 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Launcher features, item 18: skin and cape. Stacked on #2631 (offline names).

A Microsoft account's skin and cape come with sign-in, which is still "coming soon". This PR covers the offline side: a local skin and cape for each offline name.

  • Settings > Account: each offline name gets a Skin… button. It opens a panel with:
    • the front of the skin (head, body, arms, legs, each with its outer layer) and of the cape;
    • Choose a skin… / Default skin, Classic arms / Slim arms, Choose a cape… / No cape.
  • Formats are Mojang's own:
    • a skin is 64×64, or the older 64×32, whose left arm and leg mirror the right ones;
    • a cape is 64×32 (or the older 22×17).
    • Any other size or a non-PNG is refused with a line saying why.
  • The launcher keeps copies in its skins/ folder: <name>.png and <name>.cape.png.
  • accounts.json gains looks (model, skin, cape per name). It is left out while empty, and forgetting a name drops its look.
  • The game: when that name plays, the game gets HORIZON_OFFLINE_SKIN, HORIZON_OFFLINE_SKIN_MODEL and HORIZON_OFFLINE_CAPE, from the window's Play and from play.
    • These are environment variables, because the game refuses unknown arguments.
    • Today's game doesn't read them yet, so it still draws the default skins. The panel says so.
    • Reading them needs dynamic entity textures in the game. That is noted in FEATURES.md as a leftover.
  • CLI and MCP: account skin <name> [FILE] [--model classic|slim] [--cape FILE] [--no-skin] [--no-cape]; with only a name, it shows the look. The tool is account_skin, generated.
  • launcher/README.md: a "Skin and cape" bullet. docs/launcher-commands.md regenerated.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (185 + 36). The 4 new tests cover:
    • the front view takes each part from its place: the head, the hat over it, the body, both arms, the legs;
    • slim arms leave a column;
    • an old 64×32 skin mirrors its right limbs;
    • only skin and cape sizes are kept, and a non-PNG is refused;
    • a kept look reaches the game only with its files, names in any case, and the JSON form.
  • CLI, scratch homes, with a test skin and cape drawn for this:
    • account skin Nobody skin.png → "No offline name Nobody".
    • A 128×128 file → "A skin is 64×64 (or the older 64×32) pixels; this one is 128×128."
    • account skin Alex skin.png --model slim --cape cape.png → "Alex: skin kept (slim arms), cape kept".
    • play --instance hardcore as Alex: the game got --name Alex, HORIZON_OFFLINE_SKIN=…/skins/alex.png, HORIZON_OFFLINE_SKIN_MODEL=slim and HORIZON_OFFLINE_CAPE=…/skins/alex.cape.png.
    • As Steve_B, who has no look: none of the three.
  • Window:
    • Skin… on Alex opened the panel with both previews in slim arms.
    • Classic arms redrew the arms 4 px wide.
    • No cape cleared the frame, and accounts.json then had "model": "classic", "skin": true and no cape.
    • Choose a cape… through the macOS file dialog brought the cape back ("Alex's cape is kept.").
    • Choose a skin… with the 128×128 file showed the refusal in red, and the kept skin stayed.
Skin… (slim arms) Classic arms, no cape Cape chosen in the dialog A wrong size refused

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2632 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-skins` --- ### 📝 Commits (1) - [`b2199f5`](https://github.com/horizon-rust/horizon/commit/b2199f5a0e45eb18cc0b24c75ef3f1b55c976c85) launcher: a skin and a cape for each offline name ### 📊 Changes **10 files changed** (+642 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+15 -0) 📝 `launcher/README.md` (+7 -0) 📝 `launcher/src/account.rs` (+20 -0) 📝 `launcher/src/cli.rs` (+77 -1) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+5 -0) ➕ `launcher/src/skin_page.rs` (+225 -0) ➕ `launcher/src/skins.rs` (+176 -0) ➕ `launcher/src/skins/tests.rs` (+104 -0) 📝 `launcher/src/switch_page.rs` (+12 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Launcher features, item 18: skin and cape. Stacked on #2631 (offline names). A Microsoft account's skin and cape come with sign-in, which is still "coming soon". This PR covers the offline side: a local skin and cape for each offline name. - **Settings > Account**: each offline name gets a **Skin…** button. It opens a panel with: - the front of the skin (head, body, arms, legs, each with its outer layer) and of the cape; - **Choose a skin…** / **Default skin**, **Classic arms** / **Slim arms**, **Choose a cape…** / **No cape**. - Formats are Mojang's own: - a skin is 64×64, or the older 64×32, whose left arm and leg mirror the right ones; - a cape is 64×32 (or the older 22×17). - Any other size or a non-PNG is refused with a line saying why. - The launcher keeps copies in its `skins/` folder: `<name>.png` and `<name>.cape.png`. - `accounts.json` gains `looks` (model, skin, cape per name). It is left out while empty, and forgetting a name drops its look. - **The game**: when that name plays, the game gets `HORIZON_OFFLINE_SKIN`, `HORIZON_OFFLINE_SKIN_MODEL` and `HORIZON_OFFLINE_CAPE`, from the window's Play and from `play`. - These are environment variables, because the game refuses unknown arguments. - Today's game doesn't read them yet, so it still draws the default skins. The panel says so. - Reading them needs dynamic entity textures in the game. That is noted in FEATURES.md as a leftover. - CLI and MCP: `account skin <name> [FILE] [--model classic|slim] [--cape FILE] [--no-skin] [--no-cape]`; with only a name, it shows the look. The tool is `account_skin`, generated. - launcher/README.md: a "Skin and cape" bullet. docs/launcher-commands.md regenerated. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (185 + 36). The 4 new tests cover: - the front view takes each part from its place: the head, the hat over it, the body, both arms, the legs; - slim arms leave a column; - an old 64×32 skin mirrors its right limbs; - only skin and cape sizes are kept, and a non-PNG is refused; - a kept look reaches the game only with its files, names in any case, and the JSON form. - CLI, scratch homes, with a test skin and cape drawn for this: - `account skin Nobody skin.png` → "No offline name Nobody". - A 128×128 file → "A skin is 64×64 (or the older 64×32) pixels; this one is 128×128." - `account skin Alex skin.png --model slim --cape cape.png` → "Alex: skin kept (slim arms), cape kept". - `play --instance hardcore` as Alex: the game got `--name Alex`, `HORIZON_OFFLINE_SKIN=…/skins/alex.png`, `HORIZON_OFFLINE_SKIN_MODEL=slim` and `HORIZON_OFFLINE_CAPE=…/skins/alex.cape.png`. - As Steve_B, who has no look: none of the three. - Window: - Skin… on Alex opened the panel with both previews in slim arms. - Classic arms redrew the arms 4 px wide. - No cape cleared the frame, and accounts.json then had `"model": "classic", "skin": true` and no cape. - Choose a cape… through the macOS file dialog brought the cape back ("Alex's cape is kept."). - Choose a skin… with the 128×128 file showed the refusal in red, and the kept skin stayed. | Skin… (slim arms) | Classic arms, no cape | Cape chosen in the dialog | A wrong size refused | |---|---|---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/skins/panel.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/skins/classic.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/skins/cape.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/skins/refused.png) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:32 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4489
No description provided.