DeferredRegistries
[Fabric/Quilt Mod] Register things in ease
Install / Use
/learn @DM-Earth/DeferredRegistriesREADME
This Minecraft mod provides a way to register things that are not available at the time of registration, which is similar to how Minecraft Forge's DeferredRegister works.
Setup
repositories {
// [...]
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
// [...]
modImplementation include("maven.modrinth:deferred-registries:<version_id>")
}
Usage
First, create a DeferredRegistries object, here we use Item as example:
private static final DeferredRegistries<Item> ITEMS = DeferredRegistries.create(Registry.ITEM, "example_mod");
Then, register things to it:
public static final DeferredObject<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () -> new Item(new Item.Settings()));
public static final DeferredObject<Item> SIMPLE_ITEM = ITEMS.register("simple_item", new Item(new Item.Settings()));
Finally, register the DeferredRegistries object when initializing your mod:
@Override
public void onInitialize() {
ITEMS.register();
}
Related Skills
gh-issues
339.5kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
oracle
339.5kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
tmux
339.5kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
