Code Monkey home page Code Monkey logo

kmccc's Introduction

KMCCC

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

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
  • [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

LauncherCore core = LauncherCore.Create(
	new LauncherCoreCreationOption(
		javaPath: Config.Instance.JavaPath, // by default it will be the first version finded
		gameRootPath: null, // by defualt it will be ./.minecraft/
		versionLocator: the Version Locator // by default it will be new JVersionLocator()
	));

How to find Versions

var versions = core.GetVersions();

var version = core.GetVersion("1.8");

unlaunchable Version will be ignored

How to launch Minecraft

var result = core.Launch(new LaunchOptions
{
	Version = App.LauncherCore.GetVersion(server.VersionId)
	Authenticator = new OfflineAuthenticator("Steve"), // offline
	//Authenticator = new YggdrasilLogin("*@*.*", "***", true), // online
	MaxMemory = Config.Instance.MaxMemory, // optional
	MinMemory = Config.Instance.MaxMemory, // optional
	Mode = LaunchMode.MCLauncher, // optional
	Server = new ServerInfo {Address = "mc.hypixel.net"}, //optional
	Size = new WindowSize {Height = 768, Width = 1280} //optional
}, (Action<MinecraftLaunchArguments>) (x => { })); // optional ( modify arguments before launching

Enjoy!

kmccc's People

Contributors

kblackcn avatar zhaisoul avatar gitter-badger avatar huanghongxun avatar

Watchers

James Cloos avatar panhao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.