How thepansmith/monifactory works
Main components
• Core Modpack Assets & Configuration – these include the “config”, “config-overrides” (with separate directories for normal, hardmode, and expert), defaultconfigs files, and override files. These components illustrate the modpack’s mechanism for supporting multiple progression modes.
• KubeJS Engine – The “kubejs” directory is the backbone for custom client and server scripts. It contains subdirectories for client_scripts, server_scripts, startup_scripts, data, assets, and even tooling (like dx, eslint config, package.json). These scripts control recipe changes, mod tweaks, and integration logic.
• Build & Packaging Tools – The “tools” directory (with its bootstrap and build subfolders) and the pack-mode-switcher scripts (pack-mode-switcher.bat and .sh) are responsible for packaging, building, and switching among game modes. They automate tasks such as modifying recipes and generating configuration files.
• CI/CD and Repository-Oriented Components – The presence of the .github folder (with issue templates, workflows, GitHub Actions for builds and linting) indicates automated tests and build pipelines.
Relationships and interactions
– “Config / Overrides” (which supply game settings, difficulty modes, and mod configurations)
– “KubeJS Scripts” (both client-side and server-side modifications that alter in-game behavior and recipes)
– “External Mods & Optional Compat Modules” (whose integration points are handled by KubeJS scripts and override configurations)
• “Build & Packaging Pipeline” which is responsible for assembling the modpack – from “tools” (build scripts and code generation) and the “pack-mode-switcher” that selects the correct mode based on user input. Illustrate that these tools feed the “Config / Overrides”.
• CI/CD process (GitHub workflows) as a supporting subsystem that automatically runs linting, tests, and builds whenever changes are pushed.
Important architectural patterns and design principles
• Modularity and Mode Switching – The separation of config overrides into “normal”, “hardmode”, and “expert” shows an architectural decision to support multiple difficulty/progression modes. Represent these as independent modules that merge into the overall configuration.
• Automated Build/Deployment – The integration of GitHub Actions, tools for code generation (including credits and language files), and pack-mode switcher utilities depicts a robust development and deployment pipeline.
Relevant technologies and libraries
• KubeJS (for in-game scripting)
• JavaScript (node.js used in the “tools” directory and within KubeJS scripts)
• Minecraft Forge server (for the dedicated server setup instructions)
• GitHub Actions for CI/CD
• Various configuration formats (JSON, TOML, YAML, SNBT) are used for mod configurations. Represent these file types as part of your “Configuration Store.”