RegistrationUtils is a Gradle plugin providing registration utilities for Minecraft multi-loader projects. The plugin installs the dependency and shadows it into your mod's jar when you build, so you won't need to declare any hard runtime dependencies. It also makes registering blocks, items, and other objects across NeoForge and Fabric much simpler.
Adding the Plugin
Open build.gradle in your root directory (not in any subproject). Find the plugins block at the top and add the RegistrationUtils plugin:
<mc-version>-<plugin-version> format from 26.1 onwards, so 26.1-0.1.0 targets Minecraft 26.1. Always check the RegistrationUtils releases page for the latest version number that targets your Minecraft version.Configuring RegistrationUtils
Still in the root build.gradle, add the following block anywhere outside the plugins and subprojects sections:
The group property sets the Java package where RegistrationUtils will generate the necessary helper classes. Use the same group you defined in gradle.properties plus a .registration suffix, for example com.example.examplemod.registration.
The three project names (fabric, neoforge, common) must match the subproject names defined in your settings.gradle. Each entry tells RegistrationUtils which loader type applies so it can generate the correct registration provider implementations.
NeoForge with a capital N), update accordingly.Refreshing Gradle
Once you have saved the changes to build.gradle, open the Gradle tool window in IntelliJ IDEA and click the Refresh (sync) button. Gradle will download the plugin, apply it, and generate the registration helper files into the registration package you specified.
After the sync completes, you should see a new registrations folder appear inside your common project's generated sources. This contains the RegistrationProvider interface and loader-specific implementations that we will use in the Items and Blocks tutorials.
You can find the source for this tutorial here:
View Source on GitHubCreating Items (MultiLoader 26.1+)
Build an ItemRegistry using RegistrationProvider, register a custom item, add a generated item model and texture, wire up a creative tab, and add localisation — all from the common module.
Continue →