▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/DevKit API
DevKit API

DevKit API

Developer toolkit: registry, networking, components, config — for Fabric 1.21.x

Оцените первым
212
0
Все версии→DevKit API 0.2.0-alpha.2+1.21.11

DevKit API 0.2.0-alpha.2+1.21.11

Alpha08.08.2026

Список изменений

🧰 DevKit API 0.2.0-alpha.2

A focused update delivering version-resilient registry builders, command helpers, config reload, and several reliability fixes.

DevKit API is a lightweight library for Fabric mod developers. It provides reusable tools for registries, networking, Data Components, synchronized configuration, and data generation—without adding gameplay content of its own.


✨ Highlights

Version-Resilient Registry Builders

Item and block registration no longer requires version-specific code. The new ItemSettings and BlockSettings builders produce the same registration call on Minecraft 1.21.1, 1.21.8, and 1.21.11:

  • a single buildKeyed() call works everywhere;
  • on 1.21.1 the registry key is safely ignored;
  • on 1.21.8 and newer it is applied automatically through internal version overrides;
  • buildSimple() remains available for cases where a plain supplier is preferred;
  • the existing KRegister.register() overloads are unchanged — no breaking changes.

As a result, the per-version TestMod overrides for 1.21.8 and 1.21.11 have been removed. One source file now compiles on all three targets.

Command Helpers

DevkitCommands provides thin wrappers over Brigadier to reduce boilerplate when registering player commands:

  • auto-registration through CommandRegistrationCallback;
  • player(ctx) unwraps ServerPlayerEntity from context;
  • ok(ctx, message) and okBroadcast(ctx, message) return ready-to-use feedback;
  • compatible with the full Brigadier API — literal(), argument(), and custom command trees work as usual.

Config Reload

ConfigManager.reload() rereads a JSON configuration file from disk and returns a fresh instance. The caller decides when to swap the live reference. A malformed file is never overwritten — the method falls back to in-memory defaults, matching the existing loadOrCreate() safety guarantees.


🔧 Fixes

  • ModMenu library badge: replaced the non-functional flat key format with the correct nested "modmenu": { "badges": ["library"] } structure. DevKit API now appears as a Library in Mod Menu.
  • Components.intComponent(String): the deprecated overload no longer passes a null identifier. It now defaults to the DevKit namespace, making buildAndRegister() safe to call.
  • NetworkCompat: reconfigureIfAvailable() is now called after server-authoritative configs are sent on player join. Previously the method existed but was never wired in.
  • TestMod: the example integration mod now exercises networking, config save, and config reload at runtime through live /devkit_test commands.

📦 For Developers

Dependent mods can consume DevKit API through Modrinth Maven:

repositories {
    maven { url = "https://api.modrinth.com/maven/" }
}

dependencies {
    modImplementation "maven.modrinth:devkitapi:0.2.0-alpha.2+1.21.8"
}

Maven Local publishing remains available as a fallback. See the README for full setup instructions.


Alpha software. Public API signatures may still change before 1.0.

Файлы

devkit-api-0.2.0-alpha.2+1.21.11.jar(1.77 MiB)
Основной
Скачать

Метаданные

Канал релиза

Alpha

Номер версии

0.2.0-alpha.2+1.21.11

Загрузчики

Fabric

Версии игры

1.21.11

Загрузок

16

Дата публикации

08.08.2026

Загрузил

ID версии

Главная