Corona-Studio/ProjBobcat
Tentang
The next generation Minecraft launcher core written in C# providing the freest, fastest and the most complete experience.
Gim dan emulasiYang dapat Anda lakukan
- Authentication — MicrosoftAuthenticator (Microsoft OAuth / Xbox Live / XSTS / Minecraft Services with typed GraphResponse<T> results), YggdrasilAuthenticator (third-party authlib-injector servers), OfflineAuthenticator, and ILauncherAccountParser / DefaultLauncherAccountParser (launcher_accounts.json).
- Mod loader & modpack installers — HighVersionForgeInstaller, LegacyForgeInstaller (ForgeInstallerFactory), FabricInstaller, QuiltInstaller, OptifineInstaller, LiteLoaderInstaller, CurseForgeInstaller, and ModrinthInstaller (.mrpack).
- Ecosystem APIs & server ping — CurseForgeApiService, ModrinthApiService, and ServerPingService (Minecraft Server List Ping with DNS SRV _minecraft._tcp lookup and cancellation).
- Diagnostics & system utilities — DefaultGameLogResolver for structured log4j/stdout parsing, DefaultLogAnalyzer for automated crash cause detection (including UnsupportedClassVersionError Java mismatches), async cross-platform Java discovery (SystemInfoHelper.FindJava), CPU/memory/translation-layer inspection, TomlParser, and SharpJsonRepair.
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- -1
- dalam 15 hari
- -1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
ProjBobcat
A modern, NativeAOT-compatible, cross-platform Minecraft launcher core for .NET.
Website · Knowledge Base · NuGet · Issues · Security · 简体中文
Overview
ProjBobcat is a next-generation Minecraft launcher core written in C# 15 for .NET 11, developed and maintained by Corona Studio and powering LauncherX.
- NativeAOT & trimming ready — Built with
IsAotCompatible=true, source-generatedSystem.Text.Jsonserializer contexts, and an AOT-compatibleSharpJsonRepairlibrary for fast startup, low memory overhead, and self-contained native binaries. - Cross-platform — Supports Windows (
x64,arm64), macOS (x64,arm64), and Linux (x64,arm64), including Windows Bedrock/UWP detection and launching viaDefaultMineCraftUWPCore. - Profile-independent & caller-owned — Discovers installed versions without creating or mutating legacy launcher profile files, accepts caller-owned
LaunchSettingsandILauncherAccountParserimplementations, and usesIHttpClientFactoryfor modern HTTP connection management.
Capabilities
- Launch core & version resolution —
DefaultGameCore,DefaultVersionLocator, andDefaultLaunchArgumentParserwith recursive version inheritance, version isolation, configurableNativeReplacementPolicy(Disabled,LegacyOnly,All), custom JVM/game arguments, environment variables, pre-launch/post-exit/wrapper commands, UTF-8 console encoding, IPv4 networking preference, legacy multiplayer trust-store fixes, andDefaultMineCraftUWPCoreon Windows. - Authentication —
MicrosoftAuthenticator(Microsoft OAuth / Xbox Live / XSTS / Minecraft Services with typedGraphResponse<T>results),YggdrasilAuthenticator(third-partyauthlib-injectorservers),OfflineAuthenticator, andILauncherAccountParser/DefaultLauncherAccountParser(launcher_accounts.json). - Resource completion & downloading —
DefaultResourceCompleterfeaturing two-phase discovery-then-download, deduplicated stable download totals, SHA-1 verification, segmented multi-part downloads, retries, timeouts, and cancellation; includesVersionInfoResolver,AssetInfoResolver,LibraryInfoResolver, andGameLoggingInfoResolverwith multi-mirrorDownloadUriInfosupport. - Mod loader & modpack installers —
HighVersionForgeInstaller,LegacyForgeInstaller(ForgeInstallerFactory),FabricInstaller,QuiltInstaller,OptifineInstaller,LiteLoaderInstaller,CurseForgeInstaller, andModrinthInstaller(.mrpack). - Ecosystem APIs & server ping —
CurseForgeApiService,ModrinthApiService, andServerPingService(Minecraft Server List Ping with DNS SRV_minecraft._tcplookup and cancellation). - Diagnostics & system utilities —
DefaultGameLogResolverfor structured log4j/stdout parsing,DefaultLogAnalyzerfor automated crash cause detection (includingUnsupportedClassVersionErrorJava mismatches), async cross-platform Java discovery (SystemInfoHelper.FindJava), CPU/memory/translation-layer inspection,TomlParser, andSharpJsonRepair.
Requirements and Installation
- Target framework:
.NET 11(net11.0) - Process architecture: 64-bit (
x64/arm64) recommended; avoid preferring 32-bit builds - HTTP client: Network-backed components accept
IHttpClientFactory(for example fromMicrosoft.Extensions.Http)
Install from NuGet:
dotnet add package ProjBobcat
Or in the Visual Studio Package Manager Console:
Install-Package ProjBobcat
You can also add ProjBobcat as a Git submodule and reference ProjBobcat/ProjBobcat/ProjBobcat.csproj directly.
Core Components
| Class | Interface / Base Class | Responsibility |
|---|---|---|
DefaultGameCore |
IGameCore / GameCoreBase |
Coordinates version resolution, authentication, argument building, and process launch |
DefaultVersionLocator |
IVersionLocator / VersionLocatorBase |
Scans .minecraft/versions, resolves version inheritance, and extracts natives/libraries |
DefaultLaunchArgumentParser |
IArgumentParser / LaunchArgumentParserBase |
Builds JVM and Minecraft command-line arguments |
DefaultResourceCompleter |
IResourceCompleter |
Resolves, verifies, and downloads missing game jars, assets, libraries, and logging configs |
DefaultGameLogResolver |
IGameLogResolver |
Parses vanilla, Forge/NeoForge, Fabric, Quilt, and legacy log output into structured entries |
DefaultLogAnalyzer |
ILogAnalyzer |
Inspects recent game and crash logs to diagnose common failure causes |
ServerPingService |
ProgressReportBase |
Queries Minecraft server status and latency with optional SRV DNS resolution |
Quick Start
1. Discover Java Runtimes
using ProjBobcat.Class.Helper;
var javaPaths = new List<string>();
await foreach (var path in SystemInfoHelper.FindJava(fullSearch: false))
{
javaPaths.Add(path);
}
2. Initialize the Core and Scan Versions
using ProjBobcat.Class.Model;
using ProjBobcat.DefaultComponent.Launch;
using ProjBobcat.DefaultComponent.Launch.GameCore;
using ProjBobcat.DefaultComponent.Logging;
var rootPath = Path.GetFullPath(".minecraft");
var clientToken = Guid.NewGuid();
using var core = new DefaultGameCore
{
ClientToken = clientToken,
RootPath = rootPath,
VersionLocator = new DefaultVersionLocator(rootPath)
{
LauncherAccountParser = new DefaultLauncherAccountParser(rootPath, clientToken)
},
GameLogResolver = new DefaultGameLogResolver()
};
var versions = core.VersionLocator.GetAllGames().OfType<VersionInfo>().ToList();
3. Verify and Complete Game Resources
Resolve a VersionInfo for your target JavaRuntimeInfo, then run DefaultResourceCompleter with the built-in resolvers. Pass custom DownloadUriInfo collections to AssetInfoResolver, LibraryInfoResolver, or VersionInfoResolver if you want to use mirror sources.
using System.Runtime.InteropServices;
using ProjBobcat.Class.Model;
using ProjBobcat.DefaultComponent;
using ProjBobcat.DefaultComponent.ResourceInfoResolver;
// Obtain IHttpClientFactory from your DI container (e.g. services.AddHttpClient()).
IHttpClientFactory httpClientFactory = ...;
var java = new JavaRuntimeInfo(
JavaPath: javaPaths[0],
JavaPlatform: SystemInfoHelper.GetOsPlatform(),
JavaArch: RuntimeInformation.ProcessArchitecture,
UseSystemGlfwOnLinux: false,
UseSystemOpenAlOnLinux: false);
var resolvedGame = core.VersionLocator.ResolveGame(
versions[0],
NativeReplacementPolicy.Disabled,
java)!;
using var completer = new DefaultResourceCompleter
{
HttpClientFactory = httpClientFactory,
ResourceInfoResolvers =
[
new VersionInfoResolver(),
new AssetInfoResolver { HttpClientFactory = httpClientFactory },
new LibraryInfoResolver()
]
};
completer.GameResourceInfoResolveStatus += (_, args) =>
Console.WriteLine($"[Resolve] {args.Status} ({args.Progress.DisplayValue:F1}%)");
completer.DownloadFileChangedEvent += (_, args) =>
Console.WriteLine($"[Download] {args.ProgressPercentage.DisplayValue:F1}% ({args.Speed:F0} B/s)");
completer.DownloadFileCompletedEvent += (_, args) =>
Console.WriteLine($"[Completed] Total pending: {args.TotalNeedToDownload}");
var checkResult = await completer.CheckAndDownloadTaskAsync(
core.RootPath,
checkLocalFiles: true,
resolvedGame,
CancellationToken.None);
| Event | Signature | Description |
|---|---|---|
GameResourceInfoResolveStatus |
EventHandler<GameResourceInfoResolveEventArgs> |
Resolver discovery progress and status |
DownloadFileChangedEvent |
EventHandler<DownloadFileChangedEventArgs> |
Aggregate download progress, speed, and byte counts |
DownloadFileCompletedEvent |
EventHandler<GameResourceDownloadedEventArgs> |
Per-file completion notification |
4. Configure Authentication
Choose an authenticator backed by your ILauncherAccountParser (either DefaultLauncherAccountParser or your own implementation):
using ProjBobcat.Class.Model.MicrosoftAuth;
using ProjBobcat.DefaultComponent.Authenticator;
var accountParser = core.VersionLocator.LauncherAccountParser!;
// Offline account
var offlineAuth = new OfflineAuthenticator
{
Username = "Steve",
LauncherAccountParser = accountParser
};
// Third-party Yggdrasil (authlib-injector) account
var yggdrasilAuth = new YggdrasilAuthenticator
{
AuthServer = "https://auth.example.com/api/yggdrasil",
Email = "[email protected]",
Password = "password",
HttpClientFactory = httpClientFactory,
LauncherAccountParser = accountParser
};
// Microsoft account (configure app registration once at startup)
MicrosoftAuthenticator.Configure(new MicrosoftAuthenticatorAPISettings
{
ClientId = "<your-azure-client-id>",
TenentId = "consumers",
Scopes = [MicrosoftAuthenticator.MSAuthScope]
});
var microsoftAuth = new MicrosoftAuthenticator
{
HttpClientFactory = httpClientFactory,
LauncherAccountParser = accountParser,
CacheTokenProvider = async auth =>
{
// Load or refresh cached Microsoft Graph OAuth tokens here
return new CacheTokenProviderResult(false, false, null, null);
}
};
5. Launch the Game
using ProjBobcat.Class.Model;
var versionId = versions[0].Id;
var launchSettings = new LaunchSettings
{
GameName = versionId,
GamePath = core.RootPath,
GameResourcePath = core.RootPath,
Version = versionId,
VersionLocator = core.VersionLocator,
Authenticator = offlineAuth,
VersionInsulation = true,
NativeReplacementPolicy = NativeReplacementPolicy.Disabled,
UseShellExecute = false,
GameEnvironmentVariables = [],
UseV4NetworkingStack = false,
PreferUtf8Encoding = true,
AutoApplyFixForOldMultiPlayerGame = false,
OldGameTrustStorePath = null,
GameArguments = new GameArguments
{
Java = java,
MinMemory = 512,
MaxMemory = 2048,
GcType = GcType.G1Gc,
Resolution = new ResolutionModel { Width = 1280, Height = 720 }
}
};
core.LaunchLogEventDelegate += (_, args) =>
Console.WriteLine($"[Launch] {args.Item} ({args.ItemRunTime.TotalMilliseconds:F0} ms)");
core.GameLogEventDelegate += (_, args) =>
Console.WriteLine($"[Game] {args.RawContent}");
core.GameExitEventDelegate += (_, args) =>
Console.WriteLine($"[Exit] Code: {args.ExitCode}");
var launchResult = await core.LaunchTaskAsync(launchSettings);
| Event | Signature | Description |
|---|---|---|
LaunchLogEventDelegate |
EventHandler<LaunchLogEventArgs> |
Launcher pipeline stage timings |
GameLogEventDelegate |
EventHandler<GameLogEventArgs> |
Parsed and raw game stdout/stderr log lines |
GameExitEventDelegate |
EventHandler<GameExitEventArgs> |
Game process exit code and exception details |
Build and Test from Source
git clone https://github.com/Corona-Studio/ProjBobcat.git
cd ProjBobcat
dotnet restore ProjBobcat/ProjBobcat.slnx
dotnet build ProjBobcat/ProjBobcat.slnx -c Release --no-restore
dotnet test ProjBobcat/ProjBobcat.slnx -c Release --no-build
ProjBobcat uses central package management (Directory.Packages.props), automatically inheriting the parent policy when embedded as a submodule inside LauncherX and falling back to standalone package versions otherwise.
Contributing, Security, and Community
- Issues & Pull Requests: Report bugs or contribute improvements via GitHub Issues and Pull Requests.
- Tutorials & Docs: Visit the Corona Studio Knowledge Base.
- Security: See SECURITY.md for supported versions and vulnerability reporting.
License and Disclaimer
ProjBobcat is licensed under the MIT License.
ProjBobcat is an independent project and is not affiliated with Mojang Studios or Microsoft. Minecraft is a trademark of Mojang Studios.
Copyright © 2026 Corona Studio
Jelajahi proyek terkait
Memuat…