register

protected fun <T : TContent> register(path: String, factory: Supplier<T>): RegistrySupplier<T>(source)
protected inline fun <T : TContent> register(path: String, crossinline factory: (RegistryKey<TContent>) -> T): RegistrySupplier<T>(source)

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

Parameters

path

The path of the identifier of the content to register

factory

The function creating the object to be registered