ProjBobcat 1.40.0-CI20241113111410193-beta

This is a prerelease version of ProjBobcat.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ProjBobcat --version 1.40.0-CI20241113111410193-beta                
NuGet\Install-Package ProjBobcat -Version 1.40.0-CI20241113111410193-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProjBobcat" Version="1.40.0-CI20241113111410193-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProjBobcat --version 1.40.0-CI20241113111410193-beta                
#r "nuget: ProjBobcat, 1.40.0-CI20241113111410193-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ProjBobcat as a Cake Addin
#addin nuget:?package=ProjBobcat&version=1.40.0-CI20241113111410193-beta&prerelease

// Install ProjBobcat as a Cake Tool
#tool nuget:?package=ProjBobcat&version=1.40.0-CI20241113111410193-beta&prerelease                

ProjBobcat CodeQL

简体中文

Hx18lYLKR43WAb2 CodeFactor Grade Nuget Nuget GitHub Maintenance GitHub commit activity GitHub closed pull requests GitHub repo size GitHub stars

The next-generation Minecraft launcher core written in C# provides the freest, fastest, and most complete experience.

Developed and maintained by Corona Studio.

NativeAOT (ahead-of-time compilation) Support

ProjBobcat provides full support for NativeAot. Native AOT apps start up very quickly and use less memory. Users of the application can run it on a machine that doesn't have the .NET runtime installed.

Multi-Platform Support

Currently, we are working on the multi-platform support for ProjBobcat | Platform | Status | | -------- | ------------------ | | Windows | ✅ | | macOS | ✅ | | Linux | ✅ |

[Ad] An Awesome Typescript Launcher Core

Repo Link

All you need for Minecraft launcher in typescript. https://voxelum.github.io/minecraft-launcher-core-node/

Reminder before installation

  • <del>Because Projbobcat uses tons of the latest language features and data structures from .NET Core and .NET 6+. As a result, you need to switch your project target to at least .NET 6 or above to use this package.</del> Projbobcat now only supports the latest LTS .NET version 8.0.
  • Due to the limitation of the default number of connections in .NET, you need to manually override the number of connections to ensure that some methods in <DownloadHelper> are executed typically. You can add the following code in App.xaml.cs or the entry point of the program to complete the modification (The maximum value should not exceed 1024)
using System.Net;

ServicePointManager.DefaultConnectionLimit = 512;

Installation

There are two methods for the first step:

  • Clone and copy ProjBobcat's source code to your solution folder, then add ProjBobcat's reference to your project.
  • Directly install ProjBobcat via Nuget Package Manager or execute
Install-Package ProjBobcat

in Package Manager Console.

Roadmap

Function Status
Offline Auth Model
Online Auth Model (Yggdrasil)
Online Auth Model (Microsoft)
Version Isolation
launcher_profiles.json Analysis
launcher_accounts.json Analysis
Nuget Distribution
Old Forge Installation Model
New Forge Installation Model
Optifine Installation Model
Fabric Installation Model
LiteLoader Installation Model
Resource Auto Completion (Multi-thread downloader)
Minecraft: Windows 10 Edition Support (Detector and launcher)
Game log resolver
Game crashing detector

Instruction

Please note: ProjBobcat requires non-32-bit preferred compilation in your main project.

ProjBobcat provides 3 main components & a core to form the whole core framework.

Class Parent Interface Parent Class Function
DefaultGameCore IGameCore NG All Implementations of the Default Launch Core
DefaultLaunchArgumentParser IArgumentParser LaunchArgumentParserBase The Default Argument Analysis Tool
DefaultLauncherProfileParser ILauncherProfileParser LauncherProfileParserBase The Default launcher_profiles.json Analysis Module
DefaultVersionLocator IVersionLocator VersionLocatorBase Game Version Locator

Selective components:

Class Parent Interface Parent Class Function
DefaultResourceCompleter IResourceCompleter NG All Implementations of the Default Resource Completer

Quick Startup

Java Detection
var javaList = ProjBobcat.Class.Helper.SystemInfoHelper.FindJava(); // Returns a list of all Java installations found in the registry.
Core Initialization
var core = new DefaultGameCore
{
  ClientToken = clientToken,
  RootPath = rootPath,
  VersionLocator = new DefaultVersionLocator(rootPath, clientToken)
  {
    LauncherProfileParser = new DefaultLauncherProfileParser(rootPath, clientToken),
    LauncherAccountParser = new DefaultLauncherAccountParser(rootPath, clientToken)
  },
  GameLogResolver = new DefaultGameLogResolver()
};
Game Scanning
List<VersionInfo> gameList = core.VersionLocator.GetAllGames().ToList();
Resource Completion
//Here we use mcbbs' download source, change the uri to meet your need.
var drc = new DefaultResourceCompleter
{
    ResourceInfoResolvers = new List<IResourceInfoResolver>(2)
    {
        new AssetInfoResolver
        {
            AssetIndexUriRoot = "https://download.mcbbs.net/",
            AssetUriRoot = "https://download.mcbbs.net/assets/",
            BasePath = core.RootPath,
            VersionInfo = gameList[0]
        },
        new LibraryInfoResolver
        {
            BasePath = core.RootPath,
            LibraryUriRoot = "https://download.mcbbs.net/maven/",
            VersionInfo = gameList[0]
        }
    }
};

await drc.CheckAndDownloadTaskAsync().ConfigureAwait(false);

Here are some events which you could bind to your program.

Name Method Signature Refers to
GameResourceInfoResolveStatus (object sender, GameResourceInfoResolveEventArgs e) Resolver status
DownloadFileChangedEvent (object sender, DownloadFileChangedEventArgs e) All files download status changed
DownloadFileCompletedEvent (object sender, DownloadFileCompletedEventArgs e) Single file download completed
Launch Configuration
var launchSettings = new LaunchSettings
{
    FallBackGameArguments = new GameArguments // Default game arguments for all games in .minecraft/ as the fallback of specific game launch.
    {
        GcType = GcType.G1Gc, // GC type
        JavaExecutable = javaPath, //The path of Java executable
        Resolution = new ResolutionModel // Game Window's Resolution
        {
            Height = 600, // Height
            Width = 800 // Width
        },
        MinMemory = 512, // Minimal Memory
        MaxMemory = 1024 // Maximum Memory
    },
    Version = versionId, // The version ID of the game to launch, such as 1.7.10 or 1.15.2
    VersionInsulation = false // Version Isolation
    GameResourcePath = Core.RootPath, // Root path of the game resource(.minecraft/)
    GamePath = path, // Root path of the game (.minecraft/versions/)
    VersionLocator = Core.VersionLocator // Game's version locator
};

launchSettings.GameArguments = new GameArguments // (Optional) The arguments of specific game launch, the undefined settings here will be redirected to the fallback settings mentioned previously.
{
    AdvanceArguments = specificArguments , // Advanced launch arguments
    JavaExecutable = specificJavaExecutable, // JAVA's path
    Resolution = specificResolution, // The window's size
    MinMemory = specificMinMemory, // Minimum Memory
    MaxMemory = specificMaxMemory // Maximum Memory
};

Here are some events which you could bind to your program.

Name Method Signature Refers to
GameExitEventDelegate (object sender, GameExitEventArgs e) Game Exit
GameLogEventDelegate (object sender, GameLogEventArgs e) Game Log
LaunchLogEventDelegate (object sender, LaunchLogEventArgs e) Core Log
Define Auth Model

Offline:

launchSettings.Authenticator = new OfflineAuthenticator
{
    Username = "Username"
    LauncherAccountParser = core.VersionLocator.LauncherAccountParser // launcher_profiles.json parser
},

Online:

launchSettings.Authenticator = new YggdrasilAuthenticator
{
    LauncherAccountParser = core.VersionLocator.LauncherAccountParser
    Email = "example@example.com", // Registered E-mail address on Mojang authentication server.
    Password = "password"
};
Launch!
var result = await Core.LaunchTaskAsync(launchSettings).ConfigureAwait(true); // Returns the launch result

Stats

Alt

License

MIT. This means that you can modify or use our code for any purpose, however copyright notice and permission notice shall be included in all copies or substantial portions of your software.

Disclaimer

ProjBobcat is not affiliated with Mojang or any part of its software.

Hall of Shame

Here we'll list all programs using our code without obeying MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.40.0 403 11/29/2023
1.40.0-CIyyyy07We031729-beta 115 7/10/2024
1.40.0-CIf872e63ff141351df7... 88 6/30/2024
1.40.0-CIf871a08da21173eb5e... 117 12/4/2023
1.40.0-CIe7cd1ea9ee1cb69ad6... 97 2/7/2024
1.40.0-CId7ca0b439acc8a02cc... 85 7/9/2024
1.40.0-CIcd9442f7ed8bfff16b... 123 12/4/2023
1.40.0-CIcb3db592819742ca1b... 103 12/1/2023
1.40.0-CIc9fe2271792c8f4991... 88 1/10/2024
1.40.0-CIc70fa568e78bc49777... 96 2/17/2024
1.40.0-CIc5782437280049eb91... 100 12/9/2023
1.40.0-CIc18f4e2f7dfd60c57a... 112 12/7/2023
1.40.0-CIbc0e71cc1822689563... 89 3/29/2024
1.40.0-CIb8e8a16be08c0065b8... 116 12/1/2023
1.40.0-CIb333a6dc9bd05fd4e6... 91 3/22/2024
1.40.0-CIb0eceef6e5360b21d3... 83 4/3/2024
1.40.0-CIada4cef5c3ba618166... 81 6/23/2024
1.40.0-CI9f4c6e30d151ffdb01... 78 2/17/2024
1.40.0-CI9f3c5ac0c380d2b437... 73 3/2/2024
1.40.0-CI9ee15ab4e12fac80d4... 116 12/5/2023
1.40.0-CI9d0af450b187b46926... 88 6/8/2024
1.40.0-CI91cdd00b4c5136bbe1... 123 12/4/2023
1.40.0-CI8f1383207c6be23313... 80 2/25/2024
1.40.0-CI85432fc3b74616c967... 83 5/9/2024
1.40.0-CI835f6db3e8dc2dd185... 90 11/30/2023
1.40.0-CI7c8888e8bb2076829b... 93 1/16/2024
1.40.0-CI71622018eed85e576e... 93 12/3/2023
1.40.0-CI70302e86ae9af80549... 107 4/27/2024
1.40.0-CI6df92a2404290eb553... 91 3/6/2024
1.40.0-CI699fb72e73a86c37c0... 93 2/15/2024
1.40.0-CI61057256818dbf4839... 108 1/6/2024
1.40.0-CI5e8d9944fdbfa226e1... 97 12/4/2023
1.40.0-CI581d59c9e97b163f2d... 118 1/2/2024
1.40.0-CI512e0eaa90082acd24... 91 3/6/2024
1.40.0-CI4e84ee2b06a2439f68... 81 4/8/2024
1.40.0-CI4af878bc747377ec5a... 87 4/3/2024
1.40.0-CI4a1422dfb541f52700... 85 1/26/2024
1.40.0-CI478fbb30754192b7e7... 96 7/7/2024
1.40.0-CI478b27c9f1024bafcf... 84 3/8/2024
1.40.0-CI4420c2bfb44a387a80... 92 2/7/2024
1.40.0-CI40795e91597eb9a9de... 70 6/9/2024
1.40.0-CI40157b3a44b2938487... 94 12/20/2023
1.40.0-CI354666db80a5973ae3... 102 12/4/2023
1.40.0-CI3354ef7d34b1d293d4... 100 12/4/2023
1.40.0-CI2d99384a91adb082e2... 61 6/30/2024
1.40.0-CI2c16789759d8190705... 104 12/4/2023
1.40.0-CI2c0b53ef5a1fc4cd2d... 72 5/29/2024
1.40.0-CI2bcae0530adb7998fc... 107 11/30/2023
1.40.0-CI2a71a673f3a336a7f2... 102 1/7/2024
1.40.0-CI26a6881420fb91b6e3... 93 12/9/2023
1.40.0-CI20241121115203431-... 16 11/21/2024
1.40.0-CI20241120155539612-... 25 11/20/2024
1.40.0-CI20241117143541698-... 55 11/17/2024
1.40.0-CI20241117131552959-... 55 11/17/2024
1.40.0-CI20241117124331289-... 54 11/17/2024
1.40.0-CI20241117123049665-... 56 11/17/2024
1.40.0-CI20241117120523604-... 59 11/17/2024
1.40.0-CI20241117114710416-... 53 11/17/2024
1.40.0-CI20241116143728380-... 55 11/16/2024
1.40.0-CI20241116100621365-... 51 11/16/2024
1.40.0-CI20241116100316684-... 58 11/16/2024
1.40.0-CI20241116094942113-... 54 11/16/2024
1.40.0-CI20241116094054921-... 53 11/16/2024
1.40.0-CI20241116092826211-... 55 11/16/2024
1.40.0-CI20241116090639584-... 54 11/16/2024
1.40.0-CI20241116063329590-... 54 11/16/2024
1.40.0-CI20241116041101293-... 55 11/16/2024
1.40.0-CI20241113134417464-... 59 11/13/2024
1.40.0-CI20241113134325162-... 55 11/13/2024
1.40.0-CI20241113134313589-... 57 11/13/2024
1.40.0-CI20241113111410193-... 57 11/13/2024
1.40.0-CI20241105150242826-... 52 11/5/2024
1.40.0-CI20241018110313893-... 91 10/18/2024
1.40.0-CI20240920113444553-... 62 9/20/2024
1.40.0-CI20240830125424577-... 82 8/30/2024
1.40.0-CI20240824135739981-... 94 8/24/2024
1.40.0-CI20240817034938201-... 87 8/17/2024
1.40.0-CI20240807062714958-... 78 8/7/2024
1.40.0-CI20240801032514289-... 52 8/1/2024
1.40.0-CI20240714031807134-... 66 7/14/2024
1.40.0-CI20240714025946123-... 69 7/14/2024
1.40.0-CI20240710032325084-... 68 7/10/2024
1.40.0-CI1e96533cbf47e5ff5b... 87 12/20/2023
1.40.0-CI16d6c5b4ac531ab8f6... 82 1/18/2024
1.40.0-CI150f8c2722287d6402... 94 12/27/2023
1.40.0-CI0faae54c697608cc64... 80 3/18/2024
1.40.0-CI0f691ced304207593f... 65 6/24/2024
1.40.0-CI0da2a645adcc8815d0... 97 3/31/2024
1.40.0-CI0c807057bbab522736... 106 12/1/2023
1.40.0-CI095308cea4959fb795... 96 12/5/2023
1.40.0-CI0111e35b1e01db4a3f... 90 4/13/2024
1.32.0 227 7/31/2023
1.30.0 233 5/17/2023
1.26.0 375 4/2/2023
1.23.1 341 1/20/2023
1.23.0 311 1/19/2023
1.21.0 401 12/4/2022
1.16.0 708 6/7/2022
1.12.0 514 4/5/2022
1.9.5 371 1/7/2022
1.8.0 309 12/27/2021
1.7.1 6,319 11/23/2021
1.7.0 5,245 11/23/2021
1.6.0 420 6/21/2021
1.5.4.5 376 4/27/2021
1.5.4 370 4/5/2021
1.5.3 397 3/26/2021
1.5.2 426 1/20/2021
1.5.0 331 11/18/2020
1.0.7 488 11/4/2020
1.0.6.11 546 11/3/2020 1.0.6.11 is deprecated because it has critical bugs.
1.0.6.10 594 11/3/2020 1.0.6.10 is deprecated because it has critical bugs.
1.0.6.9 573 11/3/2020 1.0.6.9 is deprecated because it has critical bugs.
1.0.6.8 601 11/3/2020 1.0.6.8 is deprecated because it has critical bugs.
1.0.6.7 390 11/3/2020
1.0.6.6 413 11/3/2020
1.0.6.5 492 9/7/2020
1.0.6.4 630 9/5/2020 1.0.6.4 is deprecated because it has critical bugs.
1.0.6.3 704 8/29/2020 1.0.6.3 is deprecated because it has critical bugs.
1.0.6.2 651 8/21/2020 1.0.6.2 is deprecated because it has critical bugs.
1.0.6.1 503 8/21/2020
1.0.6 485 8/21/2020
1.0.5.15 471 8/21/2020
1.0.5.14 500 8/21/2020
1.0.5.13 417 8/21/2020
1.0.5.12 443 8/21/2020
1.0.5.11 493 8/21/2020 1.0.5.11 is deprecated because it has critical bugs.
1.0.5.10 531 8/21/2020 1.0.5.10 is deprecated because it has critical bugs.
1.0.5.9 511 8/21/2020 1.0.5.9 is deprecated because it has critical bugs.
1.0.5.8 547 8/21/2020 1.0.5.8 is deprecated because it has critical bugs.
1.0.5.7 543 8/21/2020 1.0.5.7 is deprecated because it has critical bugs.
1.0.5.6 568 8/21/2020 1.0.5.6 is deprecated because it has critical bugs.
1.0.5.5 581 8/21/2020 1.0.5.5 is deprecated because it has critical bugs.
1.0.5.4 602 8/21/2020 1.0.5.4 is deprecated because it has critical bugs.
1.0.5.3 567 8/21/2020 1.0.5.3 is deprecated because it has critical bugs.
1.0.5.2 466 8/21/2020
1.0.5.1 483 8/10/2020
1.0.5 470 8/8/2020
1.0.4.14 451 8/8/2020
1.0.4.13 487 8/7/2020
1.0.4.12 515 8/7/2020
1.0.4.11 520 8/7/2020
1.0.4.10 485 8/7/2020
1.0.4.9 508 8/7/2020
1.0.4.8 481 8/3/2020
1.0.4.7 503 8/3/2020
1.0.4.6 493 8/3/2020
1.0.4.5 525 8/3/2020
1.0.4.4 486 7/31/2020
1.0.4.3 512 7/31/2020
1.0.4.2 525 7/31/2020
1.0.4.1 666 7/30/2020 1.0.4.1 is deprecated because it has critical bugs.
1.0.4 627 7/30/2020 1.0.4 is deprecated because it has critical bugs.
1.0.3.8 474 7/30/2020
1.0.3.7 448 7/29/2020
1.0.3.6 489 7/24/2020
1.0.3.5 501 7/2/2020
1.0.3.4 572 7/2/2020 1.0.3.4 is deprecated because it has critical bugs.
1.0.3.3 646 7/2/2020 1.0.3.3 is deprecated because it has critical bugs.
1.0.3.2 540 7/2/2020 1.0.3.2 is deprecated because it has critical bugs.
1.0.3.1 598 7/1/2020 1.0.3.1 is deprecated because it has critical bugs.
1.0.3 451 5/31/2020
1.0.2 592 3/30/2020
1.0.1.4 515 3/2/2020
1.0.1.1 485 2/21/2020
1.0.1 484 2/17/2020
1.0.0.3 527 2/10/2020
1.0.0.2 576 2/9/2020
1.0.0.1 532 2/8/2020
1.0.0 515 2/7/2020

add support for NativeAOT
JSON performance improvements
minor bug fix
remove unused packages
now HttpClient will use system default proxy settings
resolved the issue that LaunchWrapper may not return the correct exit code