Skip to content

Latest commit

 

History

History
169 lines (123 loc) · 6.24 KB

README_EN.md

File metadata and controls

169 lines (123 loc) · 6.24 KB

StarLight.Core

中文 / English

An efficient, modular, and versatile core for Minecraft launcher

Star Forks NugetVersion NugetDownload Issues PR License

Alt



✨ Features

  • 🚀 Full-Featured: Beyond launching, it supports various login methods, installation of vanilla and other loaders, modpack parsing, and many encapsulated tools.

  • 📦 Modular: The core is modular with components for launching, installation, verification, and tools, making it easier to use.

  • 📖 Fully Open Source: You can view the completely open source code on GitHub, and it's licensed under the MIT license, allowing for reference and learning.

📜 Supported Features

Tip

StarLight.Core is still under active development. However, due to the developers' academic commitments, we welcome contributions to the project.

✅: Supported features

☑️: Features under development or completed but not yet tested

❌: Features not yet started, planned for future support

🧱: Not listed features, either not planned or will not be supported

Feature Status
Launch Game
Game Finder
Java Finder
Offline Authenticator
Microsoft Authenticator
External Authenticator
Unified Pass
Vanilla Game Installer
Fabric Installer
Forge Installer ☑️
NeoForge Installer
Optifine Installer
Multi-threaded Downloader
Skin Processor
Mod Processor ☑️
Modpack Processor
CurseForge Downloader
Modrinth Downloader
Error Analyzer

📘 Documentation and Usage Guide

Documentation: StarLight_Core Documentation and Help

Tip

This also serves as a reference guide for documentation contributors.

  • Namespaces: Each section of the documentation includes namespaces in the section titles. If you cannot find the corresponding methods, try manually adding the namespace.

  • Constructors: For methods requiring instantiation, we provide complete constructor references. Choose the constructor that suits your needs if there are multiple.

  • Method Reference: Provides the purpose of methods, along with parameters and return values. The code provided is not a direct usage example, so avoid copying it directly.

  • Parameter Details: For complex custom structures, refer to the parameter details in the table of parameters or return values.

  • Console Reference: Offers a complete usage flow and method, which helps in understanding the usage of methods. Direct copying is not recommended.

🗒️ Quick Start

1. Prerequisites

Important

If you need to use Native AOT publishing, you must use C# .NET 8.0.

Tip

Using a newer C# .NET version can provide better JSON parsing performance.

  1. Your project must use C# .NET 6.0 or later.

  2. Your project targets development on Windows; cross-platform support will be added in the future.

2. Download

a. Install via any package manager by searching for StarLight_Core.

b. Install via the command line:

dotnet add package StarLight_Core

2-2. Manual Download

a. Download from Nuget.

b. Download from Github Packages.

3. Add Required References

using StarLight_Core.Utilities;
using StarLight_Core.Authentication;
using StarLight_Core.Launch;
using StarLight_Core.Models.Launch;

Tip

Some IDEs support automatic addition of references.

4. Get Installed Games

var gameCore = GameCoreUtil.GetGameCores();

5. Add an Account

var account = new OfflineAuthentication("Steve").OfflineAuth();

Note

For more authenticators, refer to the Documentation - Authenticators section.

6. Launch Game

LaunchConfig args = new() // Configure launch parameters
{
    Account = new()
    {
        BaseAccount = account // Account
    },
    GameCoreConfig = new()
    {
        Root = ".minecraft", // Game root directory
        Version = "1.18.2" // Version to launch
    },
    JavaConfig = new()
    {
        JavaPath = "C:\\Program Files\\Java\\jdk-18.0.2.1\\bin\\javaw.exe", // Java path
        MaxMemory = 4096 // Maximum memory
    }
};
var launch = new MinecraftLauncher(args); // Instantiate launcher
var la = await launch.LaunchAsync(ReportProgress); // Launch

Note

For more launch configurations and error handling, refer to the Documentation - Launcher section.

7. More Components

Refer to the StarLight_Core Documentation and Help for tutorials on using other components.

🌐 Discussion

Join the QQ Group: 971192670

StarLight Launcher Development Group

For questions or feature suggestions, please submit an Issue.

For other needs, join the QQ group or email StarLight@InkMarks.Studio.