ProjBobcat 1.23.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ProjBobcat --version 1.23.1
NuGet\Install-Package ProjBobcat -Version 1.23.1
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.23.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProjBobcat --version 1.23.1
#r "nuget: ProjBobcat, 1.23.1"
#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.23.1

// Install ProjBobcat as a Cake Tool
#tool nuget:?package=ProjBobcat&version=1.23.1

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# providing the freest, fastest and the most complete experience.

Developed and maintained by Corona Studio.

Stats

Alt

Multi-Platform Support

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

[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

  • Because Projbobcat uses tons of latest language features and data structures from .NET Core and .NET 5+. As the result, you need to switch you project target to at least .NET 5 or above to use this package.

  • Due to the limitation of the default number of connections in .NET, you need to manually override the default number of connections to ensure that some methods in <DownloadHelper> are executed normally. 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 simply execute
    Install-Package ProjBobcat
    
    in Package Manager Console.

After the step above is completed, you need to add two lines of code into your program's entry point (App.xaml.cs or something else):

ServiceHelper.Init();
HttpClientHelper.Init();

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 WIP

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 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 Scaning

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

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 net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 273 11/29/2023
1.40.0-CIf871a08da21173eb5e... 88 12/4/2023
1.40.0-CIe7cd1ea9ee1cb69ad6... 67 2/7/2024
1.40.0-CIcd9442f7ed8bfff16b... 100 12/4/2023
1.40.0-CIcb3db592819742ca1b... 79 12/1/2023
1.40.0-CIc9fe2271792c8f4991... 60 1/10/2024
1.40.0-CIc70fa568e78bc49777... 69 2/17/2024
1.40.0-CIc5782437280049eb91... 77 12/9/2023
1.40.0-CIc18f4e2f7dfd60c57a... 90 12/7/2023
1.40.0-CIbc0e71cc1822689563... 68 3/29/2024
1.40.0-CIb8e8a16be08c0065b8... 92 12/1/2023
1.40.0-CIb333a6dc9bd05fd4e6... 70 3/22/2024
1.40.0-CIb0eceef6e5360b21d3... 64 4/3/2024
1.40.0-CI9f4c6e30d151ffdb01... 57 2/17/2024
1.40.0-CI9f3c5ac0c380d2b437... 52 3/2/2024
1.40.0-CI9ee15ab4e12fac80d4... 92 12/5/2023
1.40.0-CI91cdd00b4c5136bbe1... 99 12/4/2023
1.40.0-CI8f1383207c6be23313... 63 2/25/2024
1.40.0-CI835f6db3e8dc2dd185... 68 11/30/2023
1.40.0-CI7c8888e8bb2076829b... 69 1/16/2024
1.40.0-CI71622018eed85e576e... 75 12/3/2023
1.40.0-CI70302e86ae9af80549... 35 4/27/2024
1.40.0-CI6df92a2404290eb553... 76 3/6/2024
1.40.0-CI699fb72e73a86c37c0... 70 2/15/2024
1.40.0-CI61057256818dbf4839... 85 1/6/2024
1.40.0-CI5e8d9944fdbfa226e1... 73 12/4/2023
1.40.0-CI581d59c9e97b163f2d... 92 1/2/2024
1.40.0-CI512e0eaa90082acd24... 67 3/6/2024
1.40.0-CI4e84ee2b06a2439f68... 55 4/8/2024
1.40.0-CI4af878bc747377ec5a... 59 4/3/2024
1.40.0-CI4a1422dfb541f52700... 63 1/26/2024
1.40.0-CI478b27c9f1024bafcf... 62 3/8/2024
1.40.0-CI4420c2bfb44a387a80... 72 2/7/2024
1.40.0-CI40157b3a44b2938487... 72 12/20/2023
1.40.0-CI354666db80a5973ae3... 80 12/4/2023
1.40.0-CI3354ef7d34b1d293d4... 76 12/4/2023
1.40.0-CI2c16789759d8190705... 83 12/4/2023
1.40.0-CI2bcae0530adb7998fc... 84 11/30/2023
1.40.0-CI2a71a673f3a336a7f2... 78 1/7/2024
1.40.0-CI26a6881420fb91b6e3... 85 12/9/2023
1.40.0-CI1e96533cbf47e5ff5b... 62 12/20/2023
1.40.0-CI16d6c5b4ac531ab8f6... 62 1/18/2024
1.40.0-CI150f8c2722287d6402... 69 12/27/2023
1.40.0-CI0faae54c697608cc64... 68 3/18/2024
1.40.0-CI0da2a645adcc8815d0... 73 3/31/2024
1.40.0-CI0c807057bbab522736... 97 12/1/2023
1.40.0-CI095308cea4959fb795... 82 12/5/2023
1.40.0-CI0111e35b1e01db4a3f... 66 4/13/2024
1.32.0 194 7/31/2023
1.30.0 215 5/17/2023
1.26.0 341 4/2/2023
1.23.1 313 1/20/2023
1.23.0 280 1/19/2023
1.21.0 367 12/4/2022
1.16.0 618 6/7/2022
1.12.0 481 4/5/2022
1.9.5 344 1/7/2022
1.8.0 274 12/27/2021
1.7.1 6,282 11/23/2021
1.7.0 5,213 11/23/2021
1.6.0 390 6/21/2021
1.5.4.5 347 4/27/2021
1.5.4 332 4/5/2021
1.5.3 367 3/26/2021
1.5.2 399 1/20/2021
1.5.0 313 11/18/2020
1.0.7 458 11/4/2020
1.0.6.11 515 11/3/2020
1.0.6.10 557 11/3/2020
1.0.6.9 559 11/3/2020
1.0.6.8 574 11/3/2020
1.0.6.7 379 11/3/2020
1.0.6.6 384 11/3/2020
1.0.6.5 474 9/7/2020
1.0.6.4 582 9/5/2020
1.0.6.3 667 8/29/2020
1.0.6.2 620 8/21/2020
1.0.6.1 477 8/21/2020
1.0.6 459 8/21/2020
1.0.5.15 447 8/21/2020
1.0.5.14 451 8/21/2020
1.0.5.13 383 8/21/2020
1.0.5.12 414 8/21/2020
1.0.5.11 479 8/21/2020
1.0.5.10 503 8/21/2020
1.0.5.9 481 8/21/2020
1.0.5.8 509 8/21/2020
1.0.5.7 514 8/21/2020
1.0.5.6 541 8/21/2020
1.0.5.5 550 8/21/2020
1.0.5.4 573 8/21/2020
1.0.5.3 536 8/21/2020
1.0.5.2 437 8/21/2020
1.0.5.1 455 8/10/2020
1.0.5 437 8/8/2020
1.0.4.14 426 8/8/2020
1.0.4.13 461 8/7/2020
1.0.4.12 486 8/7/2020
1.0.4.11 494 8/7/2020
1.0.4.10 458 8/7/2020
1.0.4.9 478 8/7/2020
1.0.4.8 455 8/3/2020
1.0.4.7 473 8/3/2020
1.0.4.6 463 8/3/2020
1.0.4.5 497 8/3/2020
1.0.4.4 456 7/31/2020
1.0.4.3 478 7/31/2020
1.0.4.2 498 7/31/2020
1.0.4.1 631 7/30/2020
1.0.4 599 7/30/2020
1.0.3.8 439 7/30/2020
1.0.3.7 434 7/29/2020
1.0.3.6 458 7/24/2020
1.0.3.5 462 7/2/2020
1.0.3.4 533 7/2/2020
1.0.3.3 581 7/2/2020
1.0.3.2 503 7/2/2020
1.0.3.1 565 7/1/2020
1.0.3 425 5/31/2020
1.0.2 560 3/30/2020
1.0.1.4 489 3/2/2020
1.0.1.1 458 2/21/2020
1.0.1 462 2/17/2020
1.0.0.3 502 2/10/2020
1.0.0.2 553 2/9/2020
1.0.0.1 504 2/8/2020
1.0.0 492 2/7/2020

add GameResourcesResolveHelper  for resource resolve
fix FabricInstaller bug
fix OptifineInstaller bug
more bug fix
performance optimization