Registrar

Quick rating

Registrar

No reviews yet

SkyNotTheLimit's registration helper

API/Library
Mod Loaders
Fabric
Minecraft
26.2

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Required

About

Project Details

Type
Mod
License
MIT License
Latest Version
0.0.7+26.1
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Registrar

A registry helper for Minecraft modding

Adding Registrar To Your Project

Modrinth Maven

If you don't have the Modrinth maven in your repositories block, add it like so:

build.gradle:

maven {
    url("https://api.modrinth.com/maven")
    content {
        includeGroupAndSubgroups("maven.modrinth")
    }
}

or build.gradle.kts:

maven("https://api.modrinth.com/maven") {
    content {
        includeGroupAndSubgroups("maven.modrinth")
    }
}

Then, add this project to your dependencies.

If you're using deobfuscated Minecraft:

api("maven.modrinth:registrar:${project.registrar_version}") // or implementation
include("maven.modrinth:registrar:${project.registrar_version}")

If you're using obfuscated Minecraft:

modApi("maven.modrinth:registrar:${project.registrar_version}") // or modImplementation
include("maven.modrinth:registrar:${project.registrar_version}")
mavenLocal

First, fork or download this repository and publish it to your mavenLocal.

Then, adding the following to your repositories block:

mavenLocal()

Then, add this project to your dependencies.

If you're using deobfuscated Minecraft:

api("survivalblock.atmosphere:registrar:${project.registrar_version}") // or implementation
include("survivalblock.atmosphere:registrar:${project.registrar_version}")

If you're using obfuscated Minecraft:

modApi("survivalblock.atmosphere:registrar:${project.registrar_version}") // or modImplementation
include("survivalblock.atmosphere:registrar:${project.registrar_version}")

Normal Registrants

To start, create a Registrant instance of the type you need, like so:

private static final BlockRegistrant BLOCK_REGISTRANT = new BlockRegistrant(ExampleMod.MOD_ID);

If a registrant of the required type does not exist, you can create one!

private static final Registrant RECIPE_SERIALIZER_REGISTRANT = new Registrant(ExampleMod.MOD_ID, BuiltinRegistries.RECIPE_SERIALIZER);

Feel free to open an issue to notify me if there is a need to add other common registrants.

To register an object, simply call Registrant#register.

REGISTRANT.register("name", THING);

Note that some registrant classes have special register methods. For example, ItemRegistrant has a register method that takes three parameters.

ITEM_REGISTRANT.register("name", Item::new, new Item.Properties());

ItemRegistrant is also capable of registering BlockItems via separate register overloads.

Delayed Registrants

All normal registrants have a delayed counterpart, which can be found in the delayed package.

Delayed registrants are identical to normal registrants, with one exception: DelayedRegistrant#consumeAll must be called to actually register the objects.

public static void init() {
  REGISTRANT.consumeAll();
}

Dynamic Registrants

Dynamic registrants are registrants for dynamic registries. Currently, only registrants for DamageTypes and Enchantments exist in the base library. See these links for examples of registering damage types and enchantments.

To add the registrants for datagen, override buildRegistry in your mod's DataGeneratorEntrypoint like so:

@Override
public void buildRegistry(RegistrySetBuilder registryBuilder) {
    DYNAMIC_REGISTRANT.bootstrap(registryBuilder);
}

where bootstrap is a shorthand for registryBuilder.addRegistry(REGISTRY_KEY, DYNAMIC_REGISTRANT::bootstrap);

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works