Skip to content
Proyectos

Acerca de

.NET Minecraft Launcher Library. All Version, Auth, Forge, Java, Crossplatform

Herramientas de desarrollo

Cómo se miden estas cifras

What you can do

  • Authenticate with Microsoft Xbox account
  • Get vanilla versions and installed versions
  • Install vanilla versions
  • Launch any vanilla version (tested up to 1.21)

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

CmlLib.Core

Languages: English | Українська | 简体中文

Minecraft Launcher Library

Nuget Badge GitHub license Codacy Badge

Discord

CmlLib.Core is a Minecraft launcher library for .NET
support all vanilla and mod versions (including Forge, Fabric, etc...)

한국어 문서

AD: 런처를 직접 만들어 드립니다!

Features

  • Authenticate with Microsoft Xbox account
  • Get vanilla versions and installed versions
  • Install vanilla versions
  • Launch any vanilla version (tested up to 1.21)
  • Launch Forge, Optifine, FabricMC, LiteLoader or any other custom version
  • Install Java runtime
  • Install LiteLoader, FabricMC
  • Launch with options (direct server connecting, screen resolution, JVM arguments)
  • Cross-platform (Windows, Linux, macOS)

Go to the wiki for all features

Install

Install the CmlLib.Core Nuget package

QuickStart

Get All Versions

using CmlLib.Core;

var launcher = new MinecraftLauncher();
var versions = await launcher.GetAllVersionsAsync();
foreach (var version in versions)
{
    Console.WriteLine($"{version.Type} {version.Name}");
}

Launch the Game

using CmlLib.Core;
using CmlLib.Core.ProcessBuilder;

var launcher = new MinecraftLauncher();
var process = await launcher.InstallAndBuildProcessAsync("1.21", new MLaunchOption());
process.Start();

Launch the Game with Options

using CmlLib.Core;
using CmlLib.Core.Auth;
using CmlLib.Core.ProcessBuilder;

var path = new MinecraftPath("./my_game_dir");
var launcher = new MinecraftLauncher(path);
launcher.FileProgressChanged += (sender, args) =>
{
    Console.WriteLine($"Name: {args.Name}");
    Console.WriteLine($"Type: {args.EventType}");
    Console.WriteLine($"Total: {args.TotalTasks}");
    Console.WriteLine($"Progressed: {args.ProgressedTasks}");
};
launcher.ByteProgressChanged += (sender, args) =>
{
    Console.WriteLine($"{args.ProgressedBytes} bytes / {args.TotalBytes} bytes");
};

await launcher.InstallAsync("1.20.4");
var process = await launcher.BuildProcessAsync("1.20.4", new MLaunchOption
{
    Session = MSession.CreateOfflineSession("Gamer123"),
    MaximumRamMb = 4096
});
process.Start();

Documentation

Official documentation

한국어 문서

Example

Sample Launcher

Contributors

Made with contrib.rocks.

Explorar proyectos relacionados

Cargando…