How skidamek/automodpack works
Project type and purpose
• This is a Minecraft “mod” project named AutoModpack with three main parts:
• A core library (core/) that implements the modpack metadata generator, Netty-based file-transfer server, protocol messages, and direct-download services (Modrinth/CurseForge).
• A loader library (loader/) that contains a standalone GUI/updater/relauncher and multiple platform adapters (Fabric, Forge, NeoForge) that bootstrap the core on the client.
• The mod module (src/) which contains the actual Minecraft mod entrypoints for server & client, mixins for injecting into vanilla/Fabric/Forge, the in-game UI screens, and the custom networking hooks.
High-level file-structure analysis
• Top-level directories:
• .github/, CI workflows (build/test/release)
• core/ – the pure-Java automodpack core library
• loader/ – GUI and platform-loader adapters (Fabric/Forge/NeoForge)
• src/ – the actual Minecraft mod (entrypoints, mixins, UI, networking)
• versions/ – Gradle property overrides for different Minecraft versions
• Patterns & notable files:
• Modular Gradle multi-project using settings.gradle.kts
• Protocol in core/src/main/java/.../protocol/netty (NettyServer, handlers, messages)
• LoaderManagerService, ModpackLoaderService, DownloadClient in core
• Mixins under src/main/java/.../mixin for injecting handshake logic into Minecraft’s login/network classes.
Key insights from the README
• The mod generates a server-side metadata file listing all modpack files.
• On client connect, the mod uses secure Netty channels and Minecraft’s login hooks to tell the client where to fetch that metadata.
• The client then pulls files directly from CurseForge/Modrinth APIs or through the embedded Netty server on the server.
• Supports automatic background updating on subsequent boots.
Main components
a. Server-side components
• Minecraft Server with AutoModpack mod (entrypoint classes in src/.../init/)
• Core NettyServer (hosts metadata + file streams)
• Metadata generator (ModpackContent, ModpackExecutor)
b. Client-side components
• Minecraft Client with AutoModpack mod (init + mixins + UI screens in src/.../client & src/.../ui)
• Loader core (LoaderManagerService, GameCallService) invoked via Fabric/Forge adapter
• Netty client (DownloadClient) to connect back to the server’s NettyServer
• Direct-download managers (ModrinthAPI, CurseForgeAPI)
• Local file system storage (client’s .automodpack folder)
c. External services
• Modrinth API
• CurseForge API
d. Platform adapters
• Fabric adapter (loader/fabric/...)
• Forge adapter (loader/forge/...)
• NeoForge adapter (loader/neoforge/...)
Relationships & data flows
1. Minecraft login handshake (client ⇄ server)
• Server mod intercepts login, generates metadata, and sends metadata URL + auth via custom packet.
• Client mixin intercepts that custom packet.
2. Client fetch phase
• Client’s DownloadClient (Netty) ↔ Server’s NettyServer to pull any files not available on CurseForge/Modrinth.
• Concurrently, ModrinthAPI/CurseForgeAPI direct downloads for known mod IDs.
• Files saved under local automodpack folder.
3. Game restart or reload
• Client instructs Minecraft to reload mods (via relaunch or dynamic loading).
Architectural patterns & design principles
• Separation of concerns: core library is platform-agnostic; loader adapters handle platform bootstrapping; mod module handles in-game integration.
• Plugin/adapter pattern: multiple adapter modules for different mod loaders.
• Protocol abstraction: custom Netty protocol messages for file requests & responses.
• Mixin injection: minimal invasive hooks into Minecraft’s networking stack.
• Multi-project Gradle: clean modular build & version management.
Elements
• Blue = server components
• Green = client components
• Orange = external services/APIs
• Clouds for external APIs
• Rectangles for modules/services
Final advice
• Call out critical security boundary: trust domain between server-hosted files and client.