RegistryUtil

Utility class to register content to Minecraft registries.

Parameters

TContent

The type of the content to register

Inheritors

Constructors

Link copied to clipboard
protected constructor(modId: String, registry: RegistryKey<Registry<TContent>>)

Creates a new RegistryUtil instance.

protected constructor(modId: String, registry: IForgeRegistry<TContent>)

Creates a new RegistryUtil instance.

Inherited properties

Link copied to clipboard
protected val modId: String
Link copied to clipboard

Functions

Link copied to clipboard
protected fun <T : TContent> register(path: String, factory: (RegistryKey<TContent>) -> T): RegistryObject<T>

Adds a content to be registered in a Minecraft registry using Architectury API.

Inherited functions

Link copied to clipboard

Gets the registry entry of the given registry key from the given registry manager or null, if it's not found.

Link copied to clipboard
fun id(path: String): Identifier

Creates an Identifier from the namespace specified in the constructor and a given path.

Link copied to clipboard

Creates a RegistryKey from the registry and namespace specified in the constructor and a given path.