Home›Java›Mods›Registry Helper Lib
Registry Helper Lib
ModsJava

Registry Helper Lib

Java mod listed for Minecraft 1.20. Downloads from the MC Java Mods app on Android.

by bob_bacon · on Modrinth

Which Minecraft do you have?

Every version of the game needs its own build. Pick yours, then download — the wrong build installs fine and then does nothing in the game. This mod is built for Fabric only.

⬇ Download for 1.21.10–1.21.11⬇ Download for 1.21.5–1.21.8⬇ Download for 1.21–1.21.1⬇ Download for 1.20.5–1.20.6⬇ Download for 1.20.1–1.20.4⬇ Download for 1.20
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

RegistryHelperLib

Are you tired of writing a lot of code to register all the things of minecraft?
With this little library, you will be able to register in an easier way.

Installation

Add the Modrinth's Maven Repository in build.gradle:

    repositories {
        maven {
		    name = 'Modrinth'
		    url = 'https://api.modrinth.com/maven'
		    content {
			includeGroup 'maven.modrinth'
		}
	}
    }

Then add the mod implementation, still in build.gradle:

    dependencies{
        //other dependencies
        modImplementation("maven.modrinth:registry-helper-lib:${project.registry_helper_version}")
    }

Then add the version variable in gradle.properties. Replace the version below by the version of the lib you want:

    registry_helper_version= <version>

How to use it?

Create an instance of the RegistryHelper class. This instance will allow you to register for a registry type.

    public class ModItems {
        private static final RegistryHelper<Item> registryHelper=new RegistryHelper<>(Registries.ITEM,ExampleMod.MOD_ID);
        public static final Item EXAMPLE_ITEM= registryHelper.register("name",new Item(new Item.Settings()));

        public static void init(){
        
        }
    }
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more