ProjBobcat 1.40.0-CI20240710032325084-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-CI20240710032325084-beta                
NuGet\Install-Package ProjBobcat -Version 1.40.0-CI20240710032325084-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-CI20240710032325084-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-CI20240710032325084-beta                
#r "nuget: ProjBobcat, 1.40.0-CI20240710032325084-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-CI20240710032325084-beta&prerelease

// Install ProjBobcat as a Cake Tool
#tool nuget:?package=ProjBobcat&version=1.40.0-CI20240710032325084-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 400 11/29/2023
1.40.0-CIyyyy07We031729-beta 113 7/10/2024
1.40.0-CIf872e63ff141351df7... 87 6/30/2024
1.40.0-CIf871a08da21173eb5e... 116 12/4/2023
1.40.0-CIe7cd1ea9ee1cb69ad6... 96 2/7/2024
1.40.0-CId7ca0b439acc8a02cc... 84 7/9/2024
1.40.0-CIcd9442f7ed8bfff16b... 122 12/4/2023
1.40.0-CIcb3db592819742ca1b... 102 12/1/2023
1.40.0-CIc9fe2271792c8f4991... 87 1/10/2024
1.40.0-CIc70fa568e78bc49777... 95 2/17/2024
1.40.0-CIc5782437280049eb91... 99 12/9/2023
1.40.0-CIc18f4e2f7dfd60c57a... 111 12/7/2023
1.40.0-CIbc0e71cc1822689563... 88 3/29/2024
1.40.0-CIb8e8a16be08c0065b8... 115 12/1/2023
1.40.0-CIb333a6dc9bd05fd4e6... 90 3/22/2024
1.40.0-CIb0eceef6e5360b21d3... 82 4/3/2024
1.40.0-CIada4cef5c3ba618166... 80 6/23/2024
1.40.0-CI9f4c6e30d151ffdb01... 77 2/17/2024
1.40.0-CI9f3c5ac0c380d2b437... 72 3/2/2024
1.40.0-CI9ee15ab4e12fac80d4... 115 12/5/2023
1.40.0-CI9d0af450b187b46926... 87 6/8/2024
1.40.0-CI91cdd00b4c5136bbe1... 122 12/4/2023
1.40.0-CI8f1383207c6be23313... 79 2/25/2024
1.40.0-CI85432fc3b74616c967... 82 5/9/2024
1.40.0-CI835f6db3e8dc2dd185... 89 11/30/2023
1.40.0-CI7c8888e8bb2076829b... 92 1/16/2024
1.40.0-CI71622018eed85e576e... 92 12/3/2023
1.40.0-CI70302e86ae9af80549... 106 4/27/2024
1.40.0-CI6df92a2404290eb553... 90 3/6/2024
1.40.0-CI699fb72e73a86c37c0... 92 2/15/2024
1.40.0-CI61057256818dbf4839... 107 1/6/2024
1.40.0-CI5e8d9944fdbfa226e1... 96 12/4/2023
1.40.0-CI581d59c9e97b163f2d... 117 1/2/2024
1.40.0-CI512e0eaa90082acd24... 90 3/6/2024
1.40.0-CI4e84ee2b06a2439f68... 80 4/8/2024
1.40.0-CI4af878bc747377ec5a... 86 4/3/2024
1.40.0-CI4a1422dfb541f52700... 84 1/26/2024
1.40.0-CI478fbb30754192b7e7... 95 7/7/2024
1.40.0-CI478b27c9f1024bafcf... 83 3/8/2024
1.40.0-CI4420c2bfb44a387a80... 91 2/7/2024
1.40.0-CI40795e91597eb9a9de... 69 6/9/2024
1.40.0-CI40157b3a44b2938487... 93 12/20/2023
1.40.0-CI354666db80a5973ae3... 101 12/4/2023
1.40.0-CI3354ef7d34b1d293d4... 99 12/4/2023
1.40.0-CI2d99384a91adb082e2... 60 6/30/2024
1.40.0-CI2c16789759d8190705... 103 12/4/2023
1.40.0-CI2c0b53ef5a1fc4cd2d... 71 5/29/2024
1.40.0-CI2bcae0530adb7998fc... 106 11/30/2023
1.40.0-CI2a71a673f3a336a7f2... 101 1/7/2024
1.40.0-CI26a6881420fb91b6e3... 92 12/9/2023
1.40.0-CI20241121115203431-... 0 11/21/2024
1.40.0-CI20241120155539612-... 24 11/20/2024
1.40.0-CI20241117143541698-... 54 11/17/2024
1.40.0-CI20241117131552959-... 54 11/17/2024
1.40.0-CI20241117124331289-... 53 11/17/2024
1.40.0-CI20241117123049665-... 55 11/17/2024
1.40.0-CI20241117120523604-... 58 11/17/2024
1.40.0-CI20241117114710416-... 52 11/17/2024
1.40.0-CI20241116143728380-... 54 11/16/2024
1.40.0-CI20241116100621365-... 50 11/16/2024
1.40.0-CI20241116100316684-... 57 11/16/2024
1.40.0-CI20241116094942113-... 53 11/16/2024
1.40.0-CI20241116094054921-... 52 11/16/2024
1.40.0-CI20241116092826211-... 54 11/16/2024
1.40.0-CI20241116090639584-... 53 11/16/2024
1.40.0-CI20241116063329590-... 53 11/16/2024
1.40.0-CI20241116041101293-... 54 11/16/2024
1.40.0-CI20241113134417464-... 58 11/13/2024
1.40.0-CI20241113134325162-... 54 11/13/2024
1.40.0-CI20241113134313589-... 56 11/13/2024
1.40.0-CI20241113111410193-... 56 11/13/2024
1.40.0-CI20241105150242826-... 51 11/5/2024
1.40.0-CI20241018110313893-... 90 10/18/2024
1.40.0-CI20240920113444553-... 61 9/20/2024
1.40.0-CI20240830125424577-... 81 8/30/2024
1.40.0-CI20240824135739981-... 93 8/24/2024
1.40.0-CI20240817034938201-... 86 8/17/2024
1.40.0-CI20240807062714958-... 77 8/7/2024
1.40.0-CI20240801032514289-... 51 8/1/2024
1.40.0-CI20240714031807134-... 65 7/14/2024
1.40.0-CI20240714025946123-... 68 7/14/2024
1.40.0-CI20240710032325084-... 67 7/10/2024
1.40.0-CI1e96533cbf47e5ff5b... 86 12/20/2023
1.40.0-CI16d6c5b4ac531ab8f6... 81 1/18/2024
1.40.0-CI150f8c2722287d6402... 93 12/27/2023
1.40.0-CI0faae54c697608cc64... 79 3/18/2024
1.40.0-CI0f691ced304207593f... 64 6/24/2024
1.40.0-CI0da2a645adcc8815d0... 96 3/31/2024
1.40.0-CI0c807057bbab522736... 105 12/1/2023
1.40.0-CI095308cea4959fb795... 95 12/5/2023
1.40.0-CI0111e35b1e01db4a3f... 89 4/13/2024
1.32.0 226 7/31/2023
1.30.0 232 5/17/2023
1.26.0 374 4/2/2023
1.23.1 340 1/20/2023
1.23.0 310 1/19/2023
1.21.0 400 12/4/2022
1.16.0 707 6/7/2022
1.12.0 513 4/5/2022
1.9.5 370 1/7/2022
1.8.0 308 12/27/2021
1.7.1 6,318 11/23/2021
1.7.0 5,244 11/23/2021
1.6.0 419 6/21/2021
1.5.4.5 375 4/27/2021
1.5.4 369 4/5/2021
1.5.3 396 3/26/2021
1.5.2 425 1/20/2021
1.5.0 330 11/18/2020
1.0.7 487 11/4/2020
1.0.6.11 545 11/3/2020 1.0.6.11 is deprecated because it has critical bugs.
1.0.6.10 593 11/3/2020 1.0.6.10 is deprecated because it has critical bugs.
1.0.6.9 572 11/3/2020 1.0.6.9 is deprecated because it has critical bugs.
1.0.6.8 600 11/3/2020 1.0.6.8 is deprecated because it has critical bugs.
1.0.6.7 389 11/3/2020
1.0.6.6 412 11/3/2020
1.0.6.5 491 9/7/2020
1.0.6.4 629 9/5/2020 1.0.6.4 is deprecated because it has critical bugs.
1.0.6.3 703 8/29/2020 1.0.6.3 is deprecated because it has critical bugs.
1.0.6.2 650 8/21/2020 1.0.6.2 is deprecated because it has critical bugs.
1.0.6.1 502 8/21/2020
1.0.6 484 8/21/2020
1.0.5.15 470 8/21/2020
1.0.5.14 499 8/21/2020
1.0.5.13 416 8/21/2020
1.0.5.12 442 8/21/2020
1.0.5.11 492 8/21/2020 1.0.5.11 is deprecated because it has critical bugs.
1.0.5.10 530 8/21/2020 1.0.5.10 is deprecated because it has critical bugs.
1.0.5.9 510 8/21/2020 1.0.5.9 is deprecated because it has critical bugs.
1.0.5.8 546 8/21/2020 1.0.5.8 is deprecated because it has critical bugs.
1.0.5.7 542 8/21/2020 1.0.5.7 is deprecated because it has critical bugs.
1.0.5.6 567 8/21/2020 1.0.5.6 is deprecated because it has critical bugs.
1.0.5.5 580 8/21/2020 1.0.5.5 is deprecated because it has critical bugs.
1.0.5.4 601 8/21/2020 1.0.5.4 is deprecated because it has critical bugs.
1.0.5.3 566 8/21/2020 1.0.5.3 is deprecated because it has critical bugs.
1.0.5.2 465 8/21/2020
1.0.5.1 482 8/10/2020
1.0.5 469 8/8/2020
1.0.4.14 450 8/8/2020
1.0.4.13 486 8/7/2020
1.0.4.12 514 8/7/2020
1.0.4.11 519 8/7/2020
1.0.4.10 484 8/7/2020
1.0.4.9 507 8/7/2020
1.0.4.8 480 8/3/2020
1.0.4.7 502 8/3/2020
1.0.4.6 492 8/3/2020
1.0.4.5 524 8/3/2020
1.0.4.4 485 7/31/2020
1.0.4.3 511 7/31/2020
1.0.4.2 524 7/31/2020
1.0.4.1 665 7/30/2020 1.0.4.1 is deprecated because it has critical bugs.
1.0.4 626 7/30/2020 1.0.4 is deprecated because it has critical bugs.
1.0.3.8 473 7/30/2020
1.0.3.7 447 7/29/2020
1.0.3.6 488 7/24/2020
1.0.3.5 500 7/2/2020
1.0.3.4 571 7/2/2020 1.0.3.4 is deprecated because it has critical bugs.
1.0.3.3 645 7/2/2020 1.0.3.3 is deprecated because it has critical bugs.
1.0.3.2 539 7/2/2020 1.0.3.2 is deprecated because it has critical bugs.
1.0.3.1 597 7/1/2020 1.0.3.1 is deprecated because it has critical bugs.
1.0.3 450 5/31/2020
1.0.2 591 3/30/2020
1.0.1.4 514 3/2/2020
1.0.1.1 484 2/21/2020
1.0.1 483 2/17/2020
1.0.0.3 526 2/10/2020
1.0.0.2 575 2/9/2020
1.0.0.1 531 2/8/2020
1.0.0 514 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