This repository was archived by the owner on Jan 28, 2026. It is now read-only.
nekoniyah/MClay
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# MClay — Minecraft Instance Reloader MClay is a headless tool built with Bun + TypeScript that automatically detects CurseForge-launched Minecraft instances, watches their `mods/` folder, and restarts the game whenever mods change. It always tracks **only the most recent instance**, preventing infinite relaunch loops or duplicate watchers. Linux is fully supported. Windows support is implemented but not yet confirmed. --- ## Features * Detects Minecraft instances launched by CurseForge * Tracks **only the latest instance** (highest PID) * Watches the instance's `mods/` folder * Restarts Minecraft automatically whenever mod files change * Reconstructs CurseForge arguments, including instance names with spaces * Cross-platform: Linux ✅ Windows⚠️ (untested) * Fully headless: all output logged to `mc_reloader.log` * Bundled as a Bun-built executable --- ## Requirements * **Bun** (required for running and building) * Linux or Windows system * CurseForge launcher --- ## How It Works When you launch Minecraft through CurseForge, MClay detects the new running instance by scanning active processes and selecting the one with the highest PID. It reconstructs the actual instance path (handling names with spaces, such as `Vallesium 2`) and starts watching its `mods/` directory. Whenever a file in the `mods/` folder changes, MClay: 1. Logs the change 2. Kills the current Minecraft instance 3. Relaunches it with the reconstructed command --- ## Usage ### Run directly with Bun ```bash bun run mclay.ts ``` ### Build Linux executable ```bash ./build-source.sh ``` ### Build Windows executable ```bash ./build-windows.sh ``` The built executable will run fully headless and write logs to: ``` mc_reloader.log ``` --- ## Notes * CurseForge-specific process detection is handled through `find-process` and direct scanning * Instance path reconstruction is implemented to fix broken argument splitting * Windows path resolution and process scanning are included but not yet verified --- ## License MIT