Dynamic Registries Modifier
This tool is a specialized library for working with dynamic registries in Minecraft. It functions as a preliminary dependency that developers can integrate into their projects to extend the capabilities of working with the game's registry system.
Practical Application
To start working, you need to download the JAR file and place it in the libs folder of your project. Next, you need to make changes to the build.gradle file by adding the following lines:
repositories {
flatDir {
dirs 'libs'
}
}
// Comment: connecting the library
// Note: version may differ
dependencies {
modImplementation include(files("libs/dynamic-registries-modifier-1.0.0.jar"))
}
After successful configuration, you can proceed to writing code. Import the required class:
import cc.thonly.registry_modifier.api.DynamicRegistryManagerCallback;
Usage example:
public static final Identifier TEST = Identifier.of("test");
public static void load() {
DynamicRegistryManagerCallback.Builder<Dialog> builder = DynamicRegistryManagerCallback.createBuilder(RegistryKeys.DIALOG);
builder.register(builder, TEST, value...)
DynamicRegistryManagerCallback.add(builder);
}