umarfarooq112233

make minecraft mod that allow to add mods in game while game is open and mod start working without restarting game

Kodari AI
KodariOct 17 at 1:23 pm 1
HotSwapModLoader
Enables runtime mod loading in Minecraft Fabric without game restarts. Provides a dynamic classloader that compiles and loads new mod JARs from a designated hotswap folder while the game is running. Integrates with Fabric's mod discovery system to register new mods, mixins, and entrypoints on the fly. Features a GUI screen accessible via keybind to manage loaded mods, view status, and trigger reloads. Automatically detects file changes in the mods directory and applies them immediately, allowing players to add, remove, or update mods mid-session. Handles class unloading and resource reloading safely to prevent crashes, with comprehensive error logging for failed mod loads.

A Fabric mod can’t load arbitrary Fabric mod jars after the game has started. Fabric discovers mods, applies mixins, and initializes registries during startup; adding a jar later won’t make it behave like a normally loaded mod.

I can build either:

  • an in-game mod manager that installs jars and loads them on the next launch, or

  • a live addon loader for addons written specifically for its limited runtime API—not arbitrary Fabric mods.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code