LFInteractive Docs
  • Programming Documentation
  • C#
    • Installing Visual Studio
    • Understanding C#
      • Namespaces
      • Classes
      • Enum
      • Variables
        • Static Types
        • Primitive Types
        • Access Modifiers
        • Variables vs Properties
        • Nullable Variables
      • Getters and Setters
      • Solution vs Project
      • Struct vs Class
      • Coding Conventions
      • Tasks and Async
        • Parallel Tasks
      • Methods
      • PreProcessor Statements
    • Creating Your First Console App
      • Class Library
        • Models
          • File Model
          • Result Model
        • Controllers
          • File Controller
          • File System Controller
      • Console App
        • Nuget Packages
        • Main Method
    • Minecraft.NET
      • Minecraft.NET Library
      • Modrinth.NET Library
      • CurseForge.NET Library
      • Fabric.NET Library
    • Common Lib
      • Strings
      • Advanced Network Client
      • Advanced Timer
      • Advanced File Info
      • Configuration File
      • Application Config
      • Database File
      • Crypt Class
  • C++
    • Networking
      • Windows Socket (Client)
    • cclip
    • VCPKG
    • spdlog
      • Getting Started
      • Patterns
Powered by GitBook
On this page
  • Prerequisites
  • Installation
  • Usage

Was this helpful?

Edit on GitHub
  1. C#
  2. Minecraft.NET

Fabric.NET Library

Fabric.NET is a library designed to handle the downloading and installation of Fabric loaders for Minecraft instances. It provides a simple and convenient way to manage Fabric loader versions and asso

Prerequisites

Before using Fabric.NET, ensure that you have:

  • .NET Core or .NET 5.0 installed.

  • Minecraft instances set up using the InstanceManager from Chase.Minecraft.Instances.

Installation

Fabric.NET can be installed using NuGet. Open your project in Visual Studio or any other compatible IDE and run the following command in the Package Manager Console:

Install-Package Fabric.NET

Usage

Getting Fabric Loader Versions

To get an array of all available Fabric loader versions, use the FabricLoader.GetLoaderVersions method:

// Gets the latest loader versions.
string[] loader_versions = await FabricLoader.GetLoaderVersions();

Installing Fabric Loader to a Minecraft Instance

To download and install a specific Fabric loader version to a Minecraft instance, use the FabricLoader.Install method:

// Gets the instance from the instance manager.
InstanceManager manager = new InstanceManager("./instances");
InstanceModel instance = manager.GetFirstInstancesByName("Test");

// Downloads and installs the specified Fabric loader version to the specified instance.
await FabricLoader.Install(loader_versions.First(), instance);
PreviousCurseForge.NET LibraryNextCommon Lib

Last updated 1 year ago

Was this helpful?

Page cover image