All Projects → CmlLib → CmlLib.Core

CmlLib / CmlLib.Core

Licence: MIT License
.NET Minecraft Launcher Library. All Version, Auth, Forge, Java, Crossplatform

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to CmlLib.Core

Mqttnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 2,486 (+2757.47%)
Mutual labels:  netcore, netframework
MyDAL
The fastest and best ORM lite on C# for MySQL ! -- 友好, 轻量, 极致性能, 无任何第三方依赖, 持续演进~~
Stars: ✭ 32 (-63.22%)
Mutual labels:  netcore, netframework
Coding-Standards
Coding Guidelines for C#
Stars: ✭ 125 (+43.68%)
Mutual labels:  netcore, netframework
Sharer
Arduino & .NET serial communication library to read/write variables and remote call functions using the Sharer protocol. Works on Windows, Linux and MacOS.
Stars: ✭ 21 (-75.86%)
Mutual labels:  netcore, netframework
dotnet
.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Stars: ✭ 865 (+894.25%)
Mutual labels:  netcore, netframework
MQTTnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 3,309 (+3703.45%)
Mutual labels:  netcore, netframework
Minecraft-Box-Launcher
Open source Minecraft Java Edition launcher built with ElectronJS
Stars: ✭ 19 (-78.16%)
Mutual labels:  launcher, minecraft-launcher
mcpelauncher
Launch MCPE on macOS! (archived-- has been merged back upstream)
Stars: ✭ 12 (-86.21%)
Mutual labels:  launcher, minecraft-launcher
Tomlet
Zero-Dependency, model-based TOML De/Serializer for .NET
Stars: ✭ 56 (-35.63%)
Mutual labels:  netcore, netframework
ModuleLauncher.Re
Cross-platform Minecraft Launcher library for .NET
Stars: ✭ 41 (-52.87%)
Mutual labels:  launcher, minecraft-launcher-library
DDNRuntime-examples
DDNRuntime(Delphi .NET Framework/.NET Core Runtime) example. DDNRuntime is a library for Delphi to call .net dll. Support the assembly written by c#, vb.net. Support importing .net dll to delphi, can create .net wrapper automatically.
Stars: ✭ 15 (-82.76%)
Mutual labels:  netcore, netframework
ProjBobcat
The next generation Minecraft launcher core written in C# providing the freest, fastest and the most complete experience.
Stars: ✭ 80 (-8.05%)
Mutual labels:  launcher, minecraft-launcher
SockNet
The easiest and fastest way to work with sockets in C#
Stars: ✭ 42 (-51.72%)
Mutual labels:  netcore
GenshinPray
一个.net core编写的模拟原神抽卡的api,根据米哈游公布的概率模拟生成十连或单抽结果图,并返回图片地址
Stars: ✭ 33 (-62.07%)
Mutual labels:  netcore
WinReform
A simple tool to help resize and relocate stubborn windows.
Stars: ✭ 20 (-77.01%)
Mutual labels:  netcore
Terminal
All-in-one solution for the management and security of your Telegram group. This is the third version and is written in C#
Stars: ✭ 12 (-86.21%)
Mutual labels:  netcore
nactivity
workflow engine activity activiti
Stars: ✭ 55 (-36.78%)
Mutual labels:  netcore
AvroConvert
Apache Avro serializer for .NET
Stars: ✭ 44 (-49.43%)
Mutual labels:  netcore
pakkero
Pakkero is a binary packer written in Go made for fun and educational purpose. Its main goal is to take in input a program file (elf binary, script, even appimage) and compress it, protect it from tampering and intrusion.
Stars: ✭ 143 (+64.37%)
Mutual labels:  launcher
BioBalanceDetector
Bio Balance Detector's products aim to show the weak electromagnetic fields around every living being (including plants, animals and humans) and display it in a heat-map like hyper-spectral image.
Stars: ✭ 18 (-79.31%)
Mutual labels:  netcore

CmlLib.Core

Minecraft Launcher Library

Nuget Badge GitHub license Codacy Badge

Discord

CmlLib.Core is minecraft launcher library for .NET
Support all version, with Forge

한국어 README

Features

  • Asynchronous APIs
  • Mojang Authentication
  • Microsoft Xbox Live Login
  • Download the game files from the Mojang file server
  • Launch any version (tested up to 1.17.1)
  • Launch Forge, Optifine, FabricMC, LiteLoader or any other custom version
  • Install Java runtime
  • Install Forge, LiteLoader, FabricMC
  • Launch with options (direct server connecting, screen resolution)
  • Cross-platform (windows, ubuntu, macOS)

Go to wiki for all features

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;

Documentation

There are many features for custom launcher. Read wiki to use all features.
Official documentation: wiki

QuickStart

Microsoft Xbox Login

Wiki

Mojang Login

Login Process

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(response.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

// increase connection limit to fast download
System.Net.ServicePointManager.DefaultConnectionLimit = 256;

//var path = new MinecraftPath("game_directory_path");
var path = new MinecraftPath(); // use default directory

var launcher = new CMLauncher(path);

// show launch progress to console
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);
};

var versions = await launcher.GetAllVersionsAsync();
foreach (var item in versions)
{
    // show all version names
    // use this version name in CreateProcessAsync method.
    Console.WriteLine(item.Name);
}

var launchOption = new MLaunchOption
{
    MaximumRamMb = 1024,
    Session = MSession.GetOfflineSession("hello"), // Login Session. ex) Session = MSession.GetOfflineSession("hello")

    //ScreenWidth = 1600,
    //ScreenHeigth = 900,
    //ServerIp = "mc.hypixel.net"
};

//var process = await launcher.CreateProcessAsync("input version name here", launchOption);
var process = await launcher.CreateProcessAsync("1.15.2", launchOption); // vanilla
// var process = await launcher.CreateProcessAsync("1.12.2-forge1.12.2-14.23.5.2838", launchOption); // forge
// var process = await launcher.CreateProcessAsync("1.12.2-LiteLoader1.12.2"); // liteloader
// var process = await launcher.CreateProcessAsync("fabric-loader-0.11.3-1.16.5") // fabric-loader

process.Start();

Example

Sample Code

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].