RegistryKeyUtil

open class RegistryKeyUtil<TContent>(val modId: String, val registry: RegistryKey<Registry<TContent>>)(source)

Utility class to create Identifiers, RegistryKeys, and TagKeys using a specified namespace and registry.

Parameters

TContent

The type of the content to register

modId

The namespace of the content to register.

registry

The registry to register the content in

Inheritors

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

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

Creates a RegistryKey from the registry and namespace specified in the constructor and a given path. The path is derived from the property name (converted to camel_case).

Link copied to clipboard

Creates a TagKey from the registry and namespace specified in the constructor and a given path. The path is derived from the property name (converted to camel_case).

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.

Link copied to clipboard

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