Skip to content

About

A powerful library for Minecraft launchers.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

Repository files navigation

LibreLauncherLib

A powerful library for Minecraft launchers.

Maven Central Javadoc

JitPack JitPack Javadoc

Features

  • Installing any Minecraft version
  • Launching Minecraft with custom configurations
  • Support for all major mod loaders
  • Authenticating with Microsoft
  • Handling mods, resource packs, datapacks, servers, and worlds
  • Handling NBT
  • Integration with Modrinth
  • Easy-to-use API

Importing

Maven

Add this to your pom.xml:

<dependencies>
   <dependency>
      <groupId>net.consler</groupId>
      <artifactId>librelauncherlib</artifactId>
      <version>1.6</version>
   </dependency>
</dependencies>

Gradle

Add this to your build.gradle:

dependencies {
    implementation 'net.consler:librelauncherlib:1.6'
}

Example usage

  1. Install:

    new MinecraftInstaller().install(version, gameDir, ModloaderProfile.VANILLA());
  2. Launch:

    LaunchProfile launchProfile = new LaunchProfile.Builder(version, gameDir).build();
    AuthProfile authProfile = new MicrosoftAuthenticator().login(new NativeWebViewFrame()).join();
    ModloaderProfile modloaderProfile = new ModloaderProfile(ModloaderProfile.FABRIC_ID, "0.19.5")
    
    new MinecraftLauncher(launchProfile, authProfile, modloaderProfile).launch();
  3. Add a local Minecraft JAR patch:

    Instance instance = new Instance(gameDir);
    instance.addJarMod(Path.of("/path/to/OptiFine_MOD.jar"));

    At launch, LibreLauncherLib overlays the added JAR's entries onto the vanilla client.jar, leaving the downloaded client JAR unchanged. Pass the extracted JAR patch produced by OptiFine's installer, not the standalone installer JAR. This Minecraft-JAR patch flow does not require Forge.

More information

Read our wiki!

About

A powerful library for Minecraft launchers.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages