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

// Install ProjBobcat as a Cake Tool
#tool nuget:?package=ProjBobcat&version=1.40.0-CIada4cef5c3ba618166d32cfefa9105b94a95ed02-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 477 11/29/2023
1.40.0-CIyyyy07We031729-beta 127 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... 103 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... 87 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... 74 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... 65 6/30/2024
1.40.0-CI2c16789759d8190705... 106 12/4/2023
1.40.0-CI2c0b53ef5a1fc4cd2d... 76 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-CI20241204043253464-... 60 12/4/2024
1.40.0-CI20241204034742279-... 59 12/4/2024
1.40.0-CI20241202065620034-... 51 12/2/2024
1.40.0-CI20241202050845490-... 56 12/2/2024
1.40.0-CI20241130033849333-... 59 11/30/2024
1.40.0-CI20241125130436354-... 50 11/25/2024
1.40.0-CI20241122144253361-... 61 11/22/2024
1.40.0-CI20241122123609579-... 59 11/22/2024
1.40.0-CI20241121115203431-... 54 11/21/2024
1.40.0-CI20241120155539612-... 54 11/20/2024
1.40.0-CI20241117143541698-... 58 11/17/2024
1.40.0-CI20241117131552959-... 58 11/17/2024
1.40.0-CI20241117124331289-... 57 11/17/2024
1.40.0-CI20241117123049665-... 59 11/17/2024
1.40.0-CI20241117120523604-... 66 11/17/2024
1.40.0-CI20241117114710416-... 60 11/17/2024
1.40.0-CI20241116143728380-... 62 11/16/2024
1.40.0-CI20241116100621365-... 58 11/16/2024
1.40.0-CI20241116100316684-... 65 11/16/2024
1.40.0-CI20241116094942113-... 59 11/16/2024
1.40.0-CI20241116094054921-... 58 11/16/2024
1.40.0-CI20241116092826211-... 62 11/16/2024
1.40.0-CI20241116090639584-... 59 11/16/2024
1.40.0-CI20241116063329590-... 61 11/16/2024
1.40.0-CI20241116041101293-... 59 11/16/2024
1.40.0-CI20241113134417464-... 65 11/13/2024
1.40.0-CI20241113134325162-... 61 11/13/2024
1.40.0-CI20241113134313589-... 65 11/13/2024
1.40.0-CI20241113111410193-... 66 11/13/2024
1.40.0-CI20241105150242826-... 56 11/5/2024
1.40.0-CI20241018110313893-... 93 10/18/2024
1.40.0-CI20240920113444553-... 66 9/20/2024
1.40.0-CI20240830125424577-... 86 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-... 56 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 231 7/31/2023
1.30.0 237 5/17/2023
1.26.0 379 4/2/2023
1.23.1 345 1/20/2023
1.23.0 315 1/19/2023
1.21.0 405 12/4/2022
1.16.0 750 6/7/2022
1.12.0 520 4/5/2022
1.9.5 377 1/7/2022
1.8.0 315 12/27/2021
1.7.1 6,325 11/23/2021
1.7.0 5,251 11/23/2021
1.6.0 426 6/21/2021
1.5.4.5 383 4/27/2021
1.5.4 376 4/5/2021
1.5.3 403 3/26/2021
1.5.2 432 1/20/2021
1.5.0 339 11/18/2020
1.0.7 495 11/4/2020
1.0.6.11 552 11/3/2020 1.0.6.11 is deprecated because it has critical bugs.
1.0.6.10 600 11/3/2020 1.0.6.10 is deprecated because it has critical bugs.
1.0.6.9 581 11/3/2020 1.0.6.9 is deprecated because it has critical bugs.
1.0.6.8 607 11/3/2020 1.0.6.8 is deprecated because it has critical bugs.
1.0.6.7 396 11/3/2020
1.0.6.6 419 11/3/2020
1.0.6.5 498 9/7/2020
1.0.6.4 636 9/5/2020 1.0.6.4 is deprecated because it has critical bugs.
1.0.6.3 710 8/29/2020 1.0.6.3 is deprecated because it has critical bugs.
1.0.6.2 657 8/21/2020 1.0.6.2 is deprecated because it has critical bugs.
1.0.6.1 509 8/21/2020
1.0.6 493 8/21/2020
1.0.5.15 479 8/21/2020
1.0.5.14 506 8/21/2020
1.0.5.13 423 8/21/2020
1.0.5.12 451 8/21/2020
1.0.5.11 499 8/21/2020 1.0.5.11 is deprecated because it has critical bugs.
1.0.5.10 537 8/21/2020 1.0.5.10 is deprecated because it has critical bugs.
1.0.5.9 519 8/21/2020 1.0.5.9 is deprecated because it has critical bugs.
1.0.5.8 553 8/21/2020 1.0.5.8 is deprecated because it has critical bugs.
1.0.5.7 549 8/21/2020 1.0.5.7 is deprecated because it has critical bugs.
1.0.5.6 576 8/21/2020 1.0.5.6 is deprecated because it has critical bugs.
1.0.5.5 587 8/21/2020 1.0.5.5 is deprecated because it has critical bugs.
1.0.5.4 610 8/21/2020 1.0.5.4 is deprecated because it has critical bugs.
1.0.5.3 573 8/21/2020 1.0.5.3 is deprecated because it has critical bugs.
1.0.5.2 472 8/21/2020
1.0.5.1 489 8/10/2020
1.0.5 476 8/8/2020
1.0.4.14 457 8/8/2020
1.0.4.13 493 8/7/2020
1.0.4.12 521 8/7/2020
1.0.4.11 526 8/7/2020
1.0.4.10 491 8/7/2020
1.0.4.9 514 8/7/2020
1.0.4.8 487 8/3/2020
1.0.4.7 513 8/3/2020
1.0.4.6 499 8/3/2020
1.0.4.5 531 8/3/2020
1.0.4.4 492 7/31/2020
1.0.4.3 518 7/31/2020
1.0.4.2 531 7/31/2020
1.0.4.1 672 7/30/2020 1.0.4.1 is deprecated because it has critical bugs.
1.0.4 633 7/30/2020 1.0.4 is deprecated because it has critical bugs.
1.0.3.8 480 7/30/2020
1.0.3.7 454 7/29/2020
1.0.3.6 495 7/24/2020
1.0.3.5 507 7/2/2020
1.0.3.4 578 7/2/2020 1.0.3.4 is deprecated because it has critical bugs.
1.0.3.3 652 7/2/2020 1.0.3.3 is deprecated because it has critical bugs.
1.0.3.2 546 7/2/2020 1.0.3.2 is deprecated because it has critical bugs.
1.0.3.1 606 7/1/2020 1.0.3.1 is deprecated because it has critical bugs.
1.0.3 457 5/31/2020
1.0.2 601 3/30/2020
1.0.1.4 521 3/2/2020
1.0.1.1 491 2/21/2020
1.0.1 490 2/17/2020
1.0.0.3 533 2/10/2020
1.0.0.2 582 2/9/2020
1.0.0.1 538 2/8/2020
1.0.0 523 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