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

// Install ProjBobcat as a Cake Tool
#tool nuget:?package=ProjBobcat&version=1.40.0-CIc70fa568e78bc497778d9826f4f0e1d59266c1ab-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 405 11/29/2023
1.40.0-CIyyyy07We031729-beta 117 7/10/2024
1.40.0-CIf872e63ff141351df7... 90 6/30/2024
1.40.0-CIf871a08da21173eb5e... 119 12/4/2023
1.40.0-CIe7cd1ea9ee1cb69ad6... 99 2/7/2024
1.40.0-CId7ca0b439acc8a02cc... 87 7/9/2024
1.40.0-CIcd9442f7ed8bfff16b... 125 12/4/2023
1.40.0-CIcb3db592819742ca1b... 105 12/1/2023
1.40.0-CIc9fe2271792c8f4991... 90 1/10/2024
1.40.0-CIc70fa568e78bc49777... 100 2/17/2024
1.40.0-CIc5782437280049eb91... 102 12/9/2023
1.40.0-CIc18f4e2f7dfd60c57a... 114 12/7/2023
1.40.0-CIbc0e71cc1822689563... 91 3/29/2024
1.40.0-CIb8e8a16be08c0065b8... 118 12/1/2023
1.40.0-CIb333a6dc9bd05fd4e6... 93 3/22/2024
1.40.0-CIb0eceef6e5360b21d3... 85 4/3/2024
1.40.0-CIada4cef5c3ba618166... 83 6/23/2024
1.40.0-CI9f4c6e30d151ffdb01... 80 2/17/2024
1.40.0-CI9f3c5ac0c380d2b437... 75 3/2/2024
1.40.0-CI9ee15ab4e12fac80d4... 118 12/5/2023
1.40.0-CI9d0af450b187b46926... 90 6/8/2024
1.40.0-CI91cdd00b4c5136bbe1... 125 12/4/2023
1.40.0-CI8f1383207c6be23313... 82 2/25/2024
1.40.0-CI85432fc3b74616c967... 85 5/9/2024
1.40.0-CI835f6db3e8dc2dd185... 92 11/30/2023
1.40.0-CI7c8888e8bb2076829b... 95 1/16/2024
1.40.0-CI71622018eed85e576e... 95 12/3/2023
1.40.0-CI70302e86ae9af80549... 109 4/27/2024
1.40.0-CI6df92a2404290eb553... 93 3/6/2024
1.40.0-CI699fb72e73a86c37c0... 95 2/15/2024
1.40.0-CI61057256818dbf4839... 110 1/6/2024
1.40.0-CI5e8d9944fdbfa226e1... 99 12/4/2023
1.40.0-CI581d59c9e97b163f2d... 120 1/2/2024
1.40.0-CI512e0eaa90082acd24... 93 3/6/2024
1.40.0-CI4e84ee2b06a2439f68... 83 4/8/2024
1.40.0-CI4af878bc747377ec5a... 89 4/3/2024
1.40.0-CI4a1422dfb541f52700... 87 1/26/2024
1.40.0-CI478fbb30754192b7e7... 98 7/7/2024
1.40.0-CI478b27c9f1024bafcf... 86 3/8/2024
1.40.0-CI4420c2bfb44a387a80... 94 2/7/2024
1.40.0-CI40795e91597eb9a9de... 72 6/9/2024
1.40.0-CI40157b3a44b2938487... 96 12/20/2023
1.40.0-CI354666db80a5973ae3... 104 12/4/2023
1.40.0-CI3354ef7d34b1d293d4... 102 12/4/2023
1.40.0-CI2d99384a91adb082e2... 63 6/30/2024
1.40.0-CI2c16789759d8190705... 106 12/4/2023
1.40.0-CI2c0b53ef5a1fc4cd2d... 74 5/29/2024
1.40.0-CI2bcae0530adb7998fc... 109 11/30/2023
1.40.0-CI2a71a673f3a336a7f2... 104 1/7/2024
1.40.0-CI26a6881420fb91b6e3... 95 12/9/2023
1.40.0-CI20241122144253361-... 0 11/22/2024
1.40.0-CI20241122123609579-... 0 11/22/2024
1.40.0-CI20241121115203431-... 25 11/21/2024
1.40.0-CI20241120155539612-... 27 11/20/2024
1.40.0-CI20241117143541698-... 57 11/17/2024
1.40.0-CI20241117131552959-... 57 11/17/2024
1.40.0-CI20241117124331289-... 56 11/17/2024
1.40.0-CI20241117123049665-... 58 11/17/2024
1.40.0-CI20241117120523604-... 61 11/17/2024
1.40.0-CI20241117114710416-... 55 11/17/2024
1.40.0-CI20241116143728380-... 57 11/16/2024
1.40.0-CI20241116100621365-... 53 11/16/2024
1.40.0-CI20241116100316684-... 60 11/16/2024
1.40.0-CI20241116094942113-... 56 11/16/2024
1.40.0-CI20241116094054921-... 55 11/16/2024
1.40.0-CI20241116092826211-... 57 11/16/2024
1.40.0-CI20241116090639584-... 56 11/16/2024
1.40.0-CI20241116063329590-... 56 11/16/2024
1.40.0-CI20241116041101293-... 57 11/16/2024
1.40.0-CI20241113134417464-... 61 11/13/2024
1.40.0-CI20241113134325162-... 57 11/13/2024
1.40.0-CI20241113134313589-... 59 11/13/2024
1.40.0-CI20241113111410193-... 59 11/13/2024
1.40.0-CI20241105150242826-... 54 11/5/2024
1.40.0-CI20241018110313893-... 93 10/18/2024
1.40.0-CI20240920113444553-... 64 9/20/2024
1.40.0-CI20240830125424577-... 84 8/30/2024
1.40.0-CI20240824135739981-... 96 8/24/2024
1.40.0-CI20240817034938201-... 89 8/17/2024
1.40.0-CI20240807062714958-... 80 8/7/2024
1.40.0-CI20240801032514289-... 54 8/1/2024
1.40.0-CI20240714031807134-... 68 7/14/2024
1.40.0-CI20240714025946123-... 71 7/14/2024
1.40.0-CI20240710032325084-... 70 7/10/2024
1.40.0-CI1e96533cbf47e5ff5b... 89 12/20/2023
1.40.0-CI16d6c5b4ac531ab8f6... 84 1/18/2024
1.40.0-CI150f8c2722287d6402... 96 12/27/2023
1.40.0-CI0faae54c697608cc64... 82 3/18/2024
1.40.0-CI0f691ced304207593f... 67 6/24/2024
1.40.0-CI0da2a645adcc8815d0... 99 3/31/2024
1.40.0-CI0c807057bbab522736... 108 12/1/2023
1.40.0-CI095308cea4959fb795... 98 12/5/2023
1.40.0-CI0111e35b1e01db4a3f... 92 4/13/2024
1.32.0 229 7/31/2023
1.30.0 235 5/17/2023
1.26.0 377 4/2/2023
1.23.1 343 1/20/2023
1.23.0 313 1/19/2023
1.21.0 403 12/4/2022
1.16.0 710 6/7/2022
1.12.0 516 4/5/2022
1.9.5 373 1/7/2022
1.8.0 311 12/27/2021
1.7.1 6,321 11/23/2021
1.7.0 5,247 11/23/2021
1.6.0 422 6/21/2021
1.5.4.5 378 4/27/2021
1.5.4 372 4/5/2021
1.5.3 399 3/26/2021
1.5.2 428 1/20/2021
1.5.0 333 11/18/2020
1.0.7 490 11/4/2020
1.0.6.11 548 11/3/2020 1.0.6.11 is deprecated because it has critical bugs.
1.0.6.10 596 11/3/2020 1.0.6.10 is deprecated because it has critical bugs.
1.0.6.9 575 11/3/2020 1.0.6.9 is deprecated because it has critical bugs.
1.0.6.8 603 11/3/2020 1.0.6.8 is deprecated because it has critical bugs.
1.0.6.7 392 11/3/2020
1.0.6.6 415 11/3/2020
1.0.6.5 494 9/7/2020
1.0.6.4 632 9/5/2020 1.0.6.4 is deprecated because it has critical bugs.
1.0.6.3 706 8/29/2020 1.0.6.3 is deprecated because it has critical bugs.
1.0.6.2 653 8/21/2020 1.0.6.2 is deprecated because it has critical bugs.
1.0.6.1 505 8/21/2020
1.0.6 487 8/21/2020
1.0.5.15 473 8/21/2020
1.0.5.14 502 8/21/2020
1.0.5.13 419 8/21/2020
1.0.5.12 445 8/21/2020
1.0.5.11 495 8/21/2020 1.0.5.11 is deprecated because it has critical bugs.
1.0.5.10 533 8/21/2020 1.0.5.10 is deprecated because it has critical bugs.
1.0.5.9 513 8/21/2020 1.0.5.9 is deprecated because it has critical bugs.
1.0.5.8 549 8/21/2020 1.0.5.8 is deprecated because it has critical bugs.
1.0.5.7 545 8/21/2020 1.0.5.7 is deprecated because it has critical bugs.
1.0.5.6 570 8/21/2020 1.0.5.6 is deprecated because it has critical bugs.
1.0.5.5 583 8/21/2020 1.0.5.5 is deprecated because it has critical bugs.
1.0.5.4 604 8/21/2020 1.0.5.4 is deprecated because it has critical bugs.
1.0.5.3 569 8/21/2020 1.0.5.3 is deprecated because it has critical bugs.
1.0.5.2 468 8/21/2020
1.0.5.1 485 8/10/2020
1.0.5 472 8/8/2020
1.0.4.14 453 8/8/2020
1.0.4.13 489 8/7/2020
1.0.4.12 517 8/7/2020
1.0.4.11 522 8/7/2020
1.0.4.10 487 8/7/2020
1.0.4.9 510 8/7/2020
1.0.4.8 483 8/3/2020
1.0.4.7 505 8/3/2020
1.0.4.6 495 8/3/2020
1.0.4.5 527 8/3/2020
1.0.4.4 488 7/31/2020
1.0.4.3 514 7/31/2020
1.0.4.2 527 7/31/2020
1.0.4.1 668 7/30/2020 1.0.4.1 is deprecated because it has critical bugs.
1.0.4 629 7/30/2020 1.0.4 is deprecated because it has critical bugs.
1.0.3.8 476 7/30/2020
1.0.3.7 450 7/29/2020
1.0.3.6 491 7/24/2020
1.0.3.5 503 7/2/2020
1.0.3.4 574 7/2/2020 1.0.3.4 is deprecated because it has critical bugs.
1.0.3.3 648 7/2/2020 1.0.3.3 is deprecated because it has critical bugs.
1.0.3.2 542 7/2/2020 1.0.3.2 is deprecated because it has critical bugs.
1.0.3.1 600 7/1/2020 1.0.3.1 is deprecated because it has critical bugs.
1.0.3 453 5/31/2020
1.0.2 594 3/30/2020
1.0.1.4 517 3/2/2020
1.0.1.1 487 2/21/2020
1.0.1 486 2/17/2020
1.0.0.3 529 2/10/2020
1.0.0.2 578 2/9/2020
1.0.0.1 534 2/8/2020
1.0.0 517 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