paper

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.

  • If this function is called during bootstrap and the key is not present in the registry, an erroneous Paper is returned that throws NoSuchElementException when trying to resolve it. Additionally, server startup will fail.

  • If this function is called after bootstrap and the key is not present in the registry, a NoSuchElementException is thrown immediately.


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.