CmlLib.Core
3.1.0
See the version list below for details.
dotnet add package CmlLib.Core --version 3.1.0
NuGet\Install-Package CmlLib.Core -Version 3.1.0
<PackageReference Include="CmlLib.Core" Version="3.1.0" />
paket add CmlLib.Core --version 3.1.0
#r "nuget: CmlLib.Core, 3.1.0"
// Install CmlLib.Core as a Cake Addin #addin nuget:?package=CmlLib.Core&version=3.1.0 // Install CmlLib.Core as a Cake Tool #tool nuget:?package=CmlLib.Core&version=3.1.0
CmlLib.Core
Minecraft Launcher Library
This library is minecraft launcher library for .NET Core and .NET Framework
Support all version, with Forge
한국어 README
한국어 문서는 최신 버전이 아닙니다. 빠른 시일 내에 업데이트하겠습니다.
Version
Current version: 3.0.0
Old versions:
Functions
- Online or Offline login
- Download the game files from the Mojang file server
- Launch any version (tested up to 1.16.2)
- Launch Forge, Optifine or any other custom version
- Download the Minecraft java runtime from the Mojang file server
- Install Forge
- Launch with options (direct server connecting, screen resolution)
- Supports cross-platform (windows, ubuntu, mac, only on .NET Core)
How to Install
Install the 'CmlLib.Core' Nuget package or download the dll files in Releases and add references to them in your project.
Write this at the top of your source code:
using CmlLib.Core;
using CmlLib.Core.Auth;
How to Use
Official documentation: wiki
Login
var login = new MLogin();
var response = login.TryAutoLogin();
if (!response.IsSuccess) // failed to automatically log in
{
var email = Console.ReadLine();
var pw = Console.ReadLine();
response = login.Authenticate(email, pw);
if (!response.IsSuccess)
throw new Exception(session.Result.ToString()) // failed to log in
}
// This session variable is the result of logging in and is used in MLaunchOption, in the Launch part below.
var session = response.Session;
Offline Login
// This session variable is the result of logging in and is used in MLaunchOption, in the Launch part below.
var session = MSession.GetOfflineSession("USERNAME");
Launch
//var path = new MinecraftPath("game_directory_path");
var path = new MinecraftPath(); // use default directory
var launcher = new CMLauncher(path);
launcher.FileChanged += (e) =>
{
Console.WriteLine("[{0}] {1} - {2}/{3}", e.FileKind.ToString(), e.FileName, e.ProgressedFileCount, e.TotalFileCount);
};
launcher.ProgressChanged += (s, e) =>
{
Console.WriteLine("{0}%", e.ProgressPercentage);
};
foreach (var item in launcher.GetAllVersions())
{
Console.WriteLine(item.Name);
}
var launchOption = new MLaunchOption
{
MaximumRamMb = 1024,
Session = session, // Login session. ex: Session = MSession.GetOfflineSession("hello")
//ScreenWidth = 1600,
//ScreenHeigth = 900,
//ServerIp = "mc.hypixel.net"
};
// launch vanila
var process = launcher.CreateProcess("1.15.2", launchOption);
// launch forge (already installed)
// var process = launcher.CreateProcess("1.16.2-forge-33.0.5", launchOption);
// launch forge (install forge if not installed)
// var process = launcher.CreateProcess("1.16.2", "33.0.5", launchOption);
process.Start();
More information
Go to wiki
What is different between CmlLib.Core and CmlLib?
CmlLib.Core is developed using .NET Core and supports cross platform, but CmlLib doesn't support it, and is deprecated.
Contact
Email: ksi123456ab@naver.com
Discord: ksi123456ab#3719
(I prefer Discord)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- LZMA-SDK (>= 19.0.0)
- Newtonsoft.Json (>= 12.0.3)
- SharpZipLib (>= 1.2.0)
-
.NETFramework 4.6.2
- LZMA-SDK (>= 19.0.0)
- Newtonsoft.Json (>= 12.0.3)
- SharpZipLib (>= 1.2.0)
-
net5.0
- LZMA-SDK (>= 19.0.0)
- Newtonsoft.Json (>= 12.0.3)
- SharpZipLib (>= 1.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CmlLib.Core:
Package | Downloads |
---|---|
CmlLib.Core.Installer.Forge
Minecraft Forge Installer |
|
CmlLib.Core.Auth.Microsoft.Uno
Minecraft login with Microsoft Xbox account migrated to work with the UnoPlatform |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.4 | 653 | 1/3/2025 |
4.0.3 | 855 | 10/29/2024 |
4.0.2 | 1,130 | 7/25/2024 |
4.0.1 | 164 | 7/22/2024 |
4.0.0 | 537 | 7/7/2024 |
4.0.0-beta.2 | 164 | 6/9/2024 |
4.0.0-beta.1 | 136 | 3/29/2024 |
3.3.10 | 1,542 | 3/9/2024 |
3.3.9 | 649 | 2/1/2024 |
3.3.8 | 1,707 | 10/14/2023 |
3.3.7 | 3,204 | 6/26/2023 |
3.3.6 | 2,640 | 1/22/2023 |
3.3.5 | 8,361 | 12/20/2021 |
3.3.4 | 981 | 12/13/2021 |
3.3.3 | 2,304 | 10/4/2021 |
3.3.2 | 949 | 9/5/2021 |
3.3.1 | 1,374 | 6/22/2021 |
3.3.0 | 955 | 6/14/2021 |
3.2.0 | 891 | 6/2/2021 |
3.2.0-pre3 | 663 | 5/25/2021 |
3.2.0-pre1 | 663 | 4/8/2021 |
3.1.1 | 1,265 | 2/11/2021 |
3.1.0 | 974 | 12/27/2020 |
3.0.0 | 1,134 | 8/25/2020 |
3.0.0-alpha3 | 766 | 8/24/2020 |
3.0.0-alpha | 870 | 7/3/2020 |
2.0.2 | 1,089 | 5/31/2020 |
2.0.1 | 989 | 5/31/2020 |
2.0.0 | 1,076 | 5/17/2020 |
0.2.0 | 1,098 | 4/13/2020 |
0.1.0 | 1,081 | 4/6/2020 |