Install a mod loader — minecraft-launcher-lib 8.0 documentation

# Install a mod loader

minecraft-launcher-lib allows you to install a mod loader for Minecraft using the `mod_loader` module. Currently the following loader are supported:

- Forge

- NeoForge

- Fabric

- Quilt

To install a mod loader, minecraft-launcher-lib provides the mod loader module, which has a unified way of installing.

Fist you need to get the loader by it’s id. Valid ID’s are `forge`, `neoforge`, `fabric` and `quilt`.

In this exmaple, we want to install fabric. So let’s get fabric.

>     fabric =  minecraft_launcher_lib.mod_loader.get_mod_loader("fabric")

Now we can install fabric for version 1.21.

>     fabric.install("1.21", minecraft_directory)

You can also take a look at the complete example.