Registry Helper Lib

Registry Helper Lib

Mod

A small library to register faster and easier. Supports Minecraft's and custom registries.

Server LibraryManagementUtility

3 downloads
2 followers
Created5 days ago
Updated5 days ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

RegistryHelperLib

Are you tired of writing a lot of code to register all the things of minecraft?
With this polyvalent library, you will be able to register faster and cleaner. Unlike other registry libraries, the Registry Helper supports all the Minecraft's registries, and even custom ones! You will see, it's realy simple to use.

Instalation

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=1.0.0+1.21

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(){
    
    }
}

Project members

JujuCorp

JujuCorp

Organization

potatoes11

Icon Maker

bob_bacon

Modder


Technical information

License
GPL-3.0-or-later
Client side
unsupported
Server side
required
Project ID