Companion

object Companion

Functions

Link copied to clipboard
fun <T : Keyed> optionalPaper(key: TypedKey<T>, registryAccess: RegistryAccess = RegistryAccess.registryAccess()): Provider<RegistryEntry.Paper<T>?>

Returns a provider of a RegistryEntry.Paper for the given key, resolving from registryAccess. When the key is not present in the registry, the returned provider's value will be null. Trying to resolve the returned provider before paper registries are available will result in an exception.

Link copied to clipboard
fun <T : Keyed> paper(registry: RegistryKey<T>, value: T): RegistryEntry.Paper<T>

Returns a RegistryEntry.Paper for the given value. It is the callers responsibility to verify that the value is actually present in the registry.

fun <T : Keyed> paper(key: TypedKey<T>, registryAccess: RegistryAccess = RegistryAccess.registryAccess()): RegistryEntry.Paper<T>

Returns a RegistryEntry.Paper for the given key, lazily resolving from registryAccess.