Back to mods
DevKit API project artwork

Modrinth · Minecraft mod

DevKit API

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

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which DevKit API release should I use?

Updated today
alpha file 0.2.0-alpha.4+1.21.11
Game version 1.21.11
Loader Fabric

DevKit API 0.2.0-alpha.4+1.21.11 targets 1.21.11 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. All 1 required mods have matching files.

Where it goes

Is DevKit API required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does DevKit API 0.2.0-alpha.4+1.21.11 need?

0.2.0-alpha.4+1.21.11. Change the file and its required mods may change too.

All 1 required mods have matching files

Install Fabric API first. We found matching files for this game-version and loader setup.

Fabric API Needed by DevKit API 0.2.0-alpha.4+1.21.11
required
Matching file found Matched file: 0.141.6+1.21.11

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add DevKit API without breaking your instance.

Built for DevKit API 0.2.0-alpha.4+1.21.11. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.2.0-alpha.4+1.21.11. It targets 1.21.11 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.2.0-alpha.4+1.21.11. It opens that exact file at the source.

About this project

What does DevKit API add?

🧰 DevKit API

A lightweight, modular toolkit for building Fabric mods with less boilerplate and more consistent infrastructure.

DevKit API is a developer-focused library for Minecraft 1.21.x. It brings together common systems that many mods need-registries, networking, Data Components, synchronized configuration, and data generation-behind small, reusable APIs.

It does not add gameplay content on its own. Players should install it only when another mod lists DevKit API as a dependency.


✨ What DevKit Provides

📦 Registry Kit

KRegister collects registry entries in declaration order and exposes them through typed RegistrySupplier references.

It provides:

  • compact and type-safe declarations;
  • duplicate identifier detection;
  • clear errors when an entry is accessed too early;
  • safe retry behavior after partial registration failures;
  • registry-key-aware factories for blocks and items on newer Minecraft versions.
public static final KRegister<Item> ITEMS =
        KRegister.create("mymod", RegistryKeys.ITEM);

public static final RegistrySupplier<Item> RUBY =
        ITEMS.register("ruby", key ->
                new Item(new Item.Settings().registryKey(key)));

🌐 Payload Networking

DevKit builds on Fabric's Payload API while keeping client-only networking isolated from common and dedicated-server code.

Packet classes declare a stable ID, codec, and direction. AutoPacketRegistry validates that metadata, registers the payload, and connects the correct receiver for S2C or C2S traffic.

Included helpers cover common sending patterns:

  • send to one player;
  • send to players tracking a position;
  • broadcast to all players;
  • send from the client to the connected server.
@AutoPacket(
        value = "mymod:energy_sync",
        direction = AutoPacket.Direction.S2C
)
public record EnergySyncPacket(int energy) implements SyncedPacket {
    // ID, CODEC, and handler
}

Client receivers are wired automatically after packet registration, including packets registered later in initialization.


⚙️ Synchronized JSON Config

ConfigManager loads a readable JSON configuration or creates a default file when none exists.

Add @SyncedConfig to make a config server-authoritative. DevKit can then synchronize its values when a player joins and broadcast updates after a reload.

The config system supports:

  • multiple named configs per mod;
  • live updates without replacing the config object;
  • safer file replacement where supported;
  • malformed-file protection;
  • synchronized payload size validation.
@SyncedConfig("mymod")
public final class MyConfig {
    public int maxEnergy = 10_000;
    public boolean enableParticles = true;
}

MyConfig config =
        ConfigManager.loadOrCreate(MyConfig.class, "mymod", "main");

🧩 Data Components

The Components API provides fluent builders around Minecraft's Data Component system.

Persistent codecs, packet codecs, caching, and registry insertion can be configured through one compact declaration.

public static final ComponentType<Integer> ENERGY =
        Components.intComponent("mymod", "energy")
                .cache()
                .buildAndRegister();

🗂️ Datagen Helpers

DevKit includes reusable foundations for frequently repeated data generation tasks:

  • item and block models;
  • block and item tags;
  • common c: convention tags;
  • block loot tables.

Version-specific implementations handle changes to Minecraft's client model system while keeping the public helper API consistent.


🔄 How It Fits Into a Mod

A dependent mod normally follows a simple lifecycle:

  1. Declare registry containers, components, packets, and config classes.
  2. Bootstrap registry entries from the mod initializer.
  3. Register packet classes during common initialization.
  4. Load configs through ConfigManager.
  5. Use the networking and config helpers from normal gameplay code.

DevKit performs validation early and keeps physical-client code away from dedicated servers, reducing setup mistakes that otherwise appear only at runtime.


📚 Examples and Documentation

The integration example is compiled with every supported build and demonstrates registry entries, Data Components, S2C/C2S packets, and synchronized configuration.


⚠️ Project Status

DevKit API is currently in alpha.

Its core systems are operational, but public API signatures may evolve before the stable release. Mod developers should pin the exact DevKit version used by their projects.


Created and maintained by jrxmod

Licensed under the Apache License 2.0.

Project description from Modrinth.

Pick your setup

DevKit API by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

3 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

DevKit API versions and loaders

10 of 10 releases match

Looking for an older file? The official Modrinth project page is in Resources.