What are you searching for?

Moff's AddonAPI-DynLoad

Moff's AddonAPI-DynLoad

A library mod that provides an API for dynamically loading objects in addon mods based on the mods loaded by Forge.

download 137.4K Downloads · favorite 0 Followers · Updated 4 weeks ago
Forge Library 1.20.1

Versions

inventory_2
Moff's AddonAPI-DynLoad 2.0.0-SNAPSHOT

2.0.0-SNAPSHOT · 4 weeks ago · 14.64 KB

Forge 1.20.1
inventory_2
AddonAPI 1.2.0

1.2.0 · 10 months ago · 13.37 KB

Release download
Forge 1.20.1
inventory_2
AddonAPI 1.1.0

1.1.0 · 10 months ago · 13.01 KB

Release download
Forge 1.20.1

About

AddonAPI

AddonAPI is a library mod that provides an API for dynamically loading objects in addon mods based on the mods loaded by Forge. If a target mod is not loaded, only the extension elements related to that mod are excluded, allowing Minecraft to launch safely.

Supported Version

  • Forge for Minecraft 1.20.1

Main Features

  • Dynamically loads registered modules according to the ModList.
  • Adds a compat section to addon configs, which can be configured per target mod.
  • Provides a recipe condition that determines whether to load a recipe based on the compat config.
  • Includes a template Mixin plugin for detecting mod load status.

Creating Modules

  1. Create a module class by extending AddonModule.
  2. Create a module provider by extending AddonModuleProvider and calling addRawModules() within the registerRawModules() method.
  3. Call AddonModuleRegistry.INSTANCE.LoadModule() in the constructor of your addon.

Using compat Settings

In data pack recipes, use the following format:

{
  "type": "YOUR_RECIPE_TYPE",
  "conditions": [
      {
        "type": "addonlib:mods_available",
        "required_raw_module": "YOUR_RAW_ADDON_MODULE_NAME"
      }
    ],
    ...
}
open_in_new View on Modrinth
Categories
Compatibility
Client: Required Server: Required
gavel LicenseRef-Multiple-Licenses

Conversation

What are your thoughts?

Related projects

Library
Fabric API
Fabric API

by modmuss50

Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.

download 128.9M
favorite 27,437
Library
Cloth Config API
Cloth Config API

by shedaniel

Configuration Library for Minecraft Mods

download 94.7M
favorite 13,679
Library Management Utility
YetAnotherConfigLib (YACL)
YetAnotherConfigLib (YACL)

by isxander

A builder-based configuration library for Minecraft!

download 66.3M
favorite 7,618
Library
Architectury API
Architectury API

by shedaniel

An intermediary api aimed to ease developing multiplatform mods.

download 61.2M
favorite 6,666
lock Cookie consent

SkinMC uses cookies to provide functionality and features.