Перейти к содержимому
Mineforgian

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.

Загрузки
189K
Подписчики
0
Обновлён
21 июня 2026 г.
Лицензия
MIT

Опубликован 29 марта 2025 г.

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"
      }
    ],
    ...
}

Ченджлог

2.1.0Релиз1.21.1 · 21 июня 2026 г.

Features

The functionality of AddonAPI 2.1.0 for Forge 1.20.1 has been ported to NeoForge 1.21.1.

Changes

  • AddonModule has been separated into CommonAddonModule (server-side) and ClientAddonModule (client-side).
  • When calling, please use AddonModuleRegistry.INSTANCE.loadCommonModule/loadClientModule appropriately.
  • RawAddonModule is now a Builder expression; please create it using RawAddonModule.builder(...). ... .build().
2.1.0Релиз1.20.1 · 25 мая 2026 г.
  • Added priority for loading modules. This allows modules such as JEI to be loaded with a delay.
  • Ensured compatibility with 2.0.0-SNAPSHOT.
  • Fixed one minor bug.
2.0.0Релиз1.20.1 · 1 марта 2026 г.

Features

  • Changed AddonModule to an interface
  • Output loaded modules to the log
  • Added a utility method to determine whether a module is loaded
  • Changed the way ModsAvailableCondition is used
2.0.0-SNAPSHOTАльфа1.20.1 · 10 января 2026 г.

Usability improvements (please wait a little longer for details)

1.2.0Релиз1.20.1 · 30 марта 2025 г.
  • Update: forge47.4.0(can also use 47.3.x)
  • Fixed: the server side was calling client side process.
1.1.0Релиз1.20.1 · 29 марта 2025 г.

NOTE: HAVE A BUG IN SERVER SIDE!

  • transferred from github
  • add compat conditions

Комментарии

Загружаем…