Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Repository files navigation

KMCCC

Join the chat at https://gitter.im/MineStudio/KMCCCBuild status

如果你需要中文的介绍信息,请打开README_CN.md

An OpenSource Minecraft Launcher for .Net Developers

KMCCC.Shared

Shared Code Between KMCCC.Basic & KMCCC.Pro

Included:

  • Basic Launch Model (LauncherCore, LaunchOptions, ...)
  • Authentication Model (Yggdrasil, Offline, ...)
  • Java & System Information Finder
  • Zip Module using .Net Internal API ( MS.Internal.IO.Zip.* )
  • Basic VersionLocator (JVersion)
  • A set of useful extensions
  • A launch reporter that can be disabled
  • Custom authentication server

KMCCC.Basic

Basic Version of KMCCC

Included:

  • Everything in kMCCC.Shared
  • No more

KMCCC.Pro

Professional Version of KMCCC

Included:

  • Everything in KMCCC.Shared
  • Mojang API
  • [WIP] Game File Download & Fix & Check (Including Version, Library, Native&Assets)
  • [WIP] More useful extensions for LaunchHandle
  • [WIP] More useful libraries that a launch might need.

Plan

We plan to delay some parameter settings, (such as versionLocator) and make more features available in KMCCC.Pro

Sample

How to initialize a LauncherCore

LauncherCorecore=LauncherCore.Create(newLauncherCoreCreationOption(javaPath:Config.Instance.JavaPath,// by default it will be the first version findedgameRootPath:null,// by defualt it will be ./.minecraft/versionLocator:theVersion Locator // by default it will be new JVersionLocator()));

How to find Versions

varversions=core.GetVersions();varversion=core.GetVersion("1.8");

unlaunchable Version will be ignored

How to launch Minecraft

varresult=core.Launch(newLaunchOptions{Version=App.LauncherCore.GetVersion(server.VersionId)Authenticator=newOfflineAuthenticator("Steve"),// offline//Authenticator = new YggdrasilLogin("*@*.*", "***", true), // onlineMaxMemory=Config.Instance.MaxMemory,// optionalMinMemory=Config.Instance.MaxMemory,// optionalMode=LaunchMode.MCLauncher,// optionalServer=newServerInfo{Address="mc.hypixel.net"},//optionalSize=newWindowSize{Height=768,Width=1280}//optional},(Action<MinecraftLaunchArguments>)(x =>{}));// optional ( modify arguments before launching

Using anonymous report

Reporter.SetClientName("Your launcher's name");// set nameReporter.SetReportLevel(ReportLevel.Full);// full report//Reporter.SetReportLevel(ReportLevel.Basic); // basic report//Reporter.SetReportLevel(ReportLevel.Min); // simplified report//Reporter.SetReportLevel(ReportLevel.None); // turn off

Enjoy!

About

An OpenSource Minecraft Launcher for .Net Developers

Topics

Resources

Stars

126 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages