在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):CmlLib/MinecraftLauncherLibrary开源软件地址(OpenSource Url):https://github.com/CmlLib/MinecraftLauncherLibrary开源编程语言(OpenSource Language):C# 99.9%开源软件介绍(OpenSource Introduction):Csharp Minecraft Launcher LibraryNOTICE!!USE CmlLib.Core CmlLib 1.1.0This library is minecraft launcher library for C#. Only for Windows (use pml if you want crossplatform) 한국어=====>>> 한국어 README ContactsEmail : [email protected] LicenseMIT License CrossplatformThis library doesn't support crossplatform. Only Windows DependencyNewtonsoft.Json Functions
SampleIf you want to learn more features of this library such as to download java runtime or launch with more detailed options, go to wiki Sample Launcher (CmlLibSample) BuildBuild CmlLib
Required dll : Newtonsoft.Json.dll, DotNetZip.dll, CmlLib.dll Build CmlLibSample (Sample launcher)
Pre-built libraryNuget package : CustomMinecraftLauncher How to useEnter the source code in the order shown below. 1. PrepareInstall Nuget Package 'CustomMinecraftLauncher' write this on the top of your source code:
2. Minecraft InitializeYou should write this code before work.
It set Game Directory that is used to download game files, load profiles, save login session, Launch, etc... 3. Login
The 'session' is login result. note : you can't use old login using username instead of mojang email. or you can use offline session :
4. Get Profile InfosProfile contain various data which launcher need. All Game Versions has its own profile, even old alpha version and forge. You can find it at (GameDirectory)₩versions₩(any-version)₩(version-name).json. MProfileInfo is metadata of profile, containing Name, Profile Path(Url), Type(Release, Snapshot, Old), ReleaseTime. and this code get profile info :
It will return all metadata from mojang web server and your game directory.
5. Choose ProfileInfo and ParseIn order to use profile data, you should parse profile.
6. Check & Download Game Files
and the handler methods of ChangeFile and ChangeProgress event is :
DownloadAll() method check the existence of game file, and download game file from mojang server if file is not exist or not valid(compare hash). 7. Make game args and Launch
set launch options, and launch it! 8. More Informationlaunch forge : You don't need any additional work to launch forge bugs : go to issue tab |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论