Skip to content

Native Minecraft Client Launcher, Profile Engine & Server Browser (#296) - #300

Open
sivaadityacoder wants to merge 1 commit into
Osiris-Team:masterfrom
sivaadityacoder:feature/296-native-minecraft-launcher
Open

sivaadityacoder wants to merge 1 commit into
Osiris-Team:masterfrom
sivaadityacoder:feature/296-native-minecraft-launcher

Conversation

@sivaadityacoder

@sivaadityacoder sivaadityacoder commented Oct 15, 2026 •

Copy link
Copy Markdown

Closes #296

What this does

This implements the native Minecraft client launcher, unified profile engine, and server browser requested in #296. The implementation is 100% clean-room, written from scratch against Mojang's launch specifications, and contains no code from HMCL or any other GPL-licensed project to keep AutoPlug fully MIT.

Three major components are introduced:

1. Native Minecraft Launcher

  • Mojang version manifest (v2) parsing and OS rule evaluation (Linux, Windows, macOS, architecture flags).
  • Multi-threaded parallel asset, library, and native downloader (8 concurrent threads) with SHA-1 hash verification.
  • Flexible launch argument builder supporting both legacy single-string arguments and modern rule-based argument arrays with complete parameter substitution (${auth_player_name}, ${version_name}, ${game_directory}, ${classpath}, etc.).
  • Offline authentication mode with deterministic UUID v3 generation (vanilla standard), ready for online MSA integration.
  • Process runner handling native library extraction, JRE discovery, and non-blocking asynchronous stdout/stderr stream piping via AutoPlug's AsyncInputStream.

2. Unified Profile Engine

  • Isolated profile workspaces stored under autoplug/profiles/<name>/.
  • Configuration persisted via AutoPlug's existing MyYaml / Dream-YAML architecture (profile.yml).
  • Per-profile game version, mod loader support (Vanilla, Fabric, Quilt, Forge), memory allocation limits, custom JVM flags, server auto-connect target, and installed mod tracking.
  • Mod version adapter that detects incompatible mods and safely disables them using standard .jar.disabled naming convention.
  • Complete CRUD management API (ProfileManager) with directory isolation.

3. Server Browser & Smart Join

  • Pure-Java binary NBT decoder and encoder for servers.dat with zero external dependencies, supporting both gzip-compressed and uncompressed formats while preserving unknown NBT tags across round-trips.
  • Server List Ping (SLP 1.7+) protocol implementation for live MOTD, player counts, reported server version, and real-time latency measurement.
  • Smart join workflow: automatically detects target server version, selects or clones a compatible profile, adapts mods, and launches the client.

CLI & UI Integration

  • Console commands integrated under .mc (.mc launch, .mc profile, .mc server, .mc ping).
  • UI panels added for Client tab: MinecraftServersPanel and MinecraftProfilesPanel replacing prior placeholder stubs.

Verification & Testing

5 dedicated test suites with 11 automated unit tests passing:

  • ProfileTest (CRUD, persistence, isolation)
  • MojangManifestTest (manifest v2 parsing & OS rule logic)
  • LaunchArgBuilderTest (argument synthesis & placeholder substitution)
  • ServersDatTest (NBT serialization round-trip & tag preservation)
  • ModVersionAdapterTest (mod disabling & compatibility checking)
mvn test -Dtest=ProfileTest,MojangManifestTest,LaunchArgBuilderTest,ServersDatTest,ModVersionAdapterTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

Maintainer Quick Check

.mc profile create default 1.21.1
.mc server add local 127.0.0.1:25565
.mc server ping 127.0.0.1:25565
.mc launch default TestPlayer

…Team#296)

- 100% MIT, no HMCL
- Mojang manifest v2 launcher + multi-threaded asset downloader
- Isolated launch profiles (Dream-YAML persistence)
- servers.dat NBT read/write + SLP ping + smart join flow
- CLI (.mc commands) + Swing UI panels
- 11 automated tests passing
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.

Native Client Launcher, Server Browser & Unified Profile Engine

1 participant