Paper

sealed interface Paper<out T : Keyed> : RegistryEntry<T>

Represents a key-value pair in a Paper registry.

Properties

Link copied to clipboard
abstract val children: Set<Provider<*>>
Link copied to clipboard
open val delegate: Provider<T>
Link copied to clipboard
abstract val isStable: Boolean
Link copied to clipboard
abstract val key: Key

The key of the registry entry.

Link copied to clipboard
abstract val parents: Set<Provider<*>>
Link copied to clipboard
abstract val registry: RegistryKey<T>

The registry key of the registry entry.

Link copied to clipboard
@get:JvmName(name = "getDialogEntryTags")
val RegistryEntry.Paper<Dialog>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Dialog>>>

Gets the tags that contain this Dialog entry.

@get:JvmName(name = "getPoiTypeEntryTags")
val RegistryEntry.Paper<PoiType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<PoiType>>>

Gets the tags that contain this PoiType entry.

@get:JvmName(name = "getArtEntryTags")
val RegistryEntry.Paper<Art>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Art>>>

Gets the tags that contain this Art entry.

@get:JvmName(name = "getFluidEntryTags")
val RegistryEntry.Paper<Fluid>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Fluid>>>

Gets the tags that contain this Fluid entry.

@get:JvmName(name = "getGameEventEntryTags")
val RegistryEntry.Paper<GameEvent>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<GameEvent>>>

Gets the tags that contain this GameEvent entry.

@get:JvmName(name = "getMusicInstrumentEntryTags")
val RegistryEntry.Paper<MusicInstrument>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<MusicInstrument>>>

Gets the tags that contain this MusicInstrument entry.

@get:JvmName(name = "getBiomeEntryTags")
val RegistryEntry.Paper<Biome>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Biome>>>

Gets the tags that contain this Biome entry.

@get:JvmName(name = "getBlockTypeEntryTags")
val RegistryEntry.Paper<BlockType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<BlockType>>>

Gets the tags that contain this BlockType entry.

@get:JvmName(name = "getPatternTypeEntryTags")
val RegistryEntry.Paper<PatternType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<PatternType>>>

Gets the tags that contain this PatternType entry.

@get:JvmName(name = "getDamageTypeEntryTags")
val RegistryEntry.Paper<DamageType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<DamageType>>>

Gets the tags that contain this DamageType entry.

@get:JvmName(name = "getEnchantmentEntryTags")
val RegistryEntry.Paper<Enchantment>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Enchantment>>>

Gets the tags that contain this Enchantment entry.

@get:JvmName(name = "getEntityTypeEntryTags")
val RegistryEntry.Paper<EntityType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<EntityType>>>

Gets the tags that contain this EntityType entry.

@get:JvmName(name = "getStructureEntryTags")
val RegistryEntry.Paper<Structure>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<Structure>>>

Gets the tags that contain this Structure entry.

@get:JvmName(name = "getItemTypeEntryTags")
val RegistryEntry.Paper<ItemType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<ItemType>>>

Gets the tags that contain this ItemType entry.

@get:JvmName(name = "getPotionTypeEntryTags")
val RegistryEntry.Paper<PotionType>.tags: Provider<Set<RegistryEntrySet.Paper.Tag<PotionType>>>

Gets the tags that contain this PotionType entry.

Link copied to clipboard
abstract val value: DeferredValue<T>

Functions

Link copied to clipboard
abstract fun addStrongChild(child: Provider<*>)
Link copied to clipboard
abstract fun addWeakChild(child: Provider<*>)
Link copied to clipboard
fun <T, R> Provider<T>.bootstrapFlatMap(transform: (T) -> Provider<R>): Provider<R>

Flat-maps the value of this provider via transform. During bootstrap phase, uses Provider.flatMap, otherwise Provider.immediateFlatMap. This allows creating flat-mapped providers based off of RegistryEntries lazily during bootstrap phase, where resolving their value is not possible, without paying for the extra overhead post-bootstrap, where immediateFlatMap can be used.

Link copied to clipboard
fun <T> Provider<Provider<T>>.bootstrapFlatten(): Provider<T>

Flattens the value of this provider. During bootstrap phase, uses Provider.flatMap, otherwise Provider.immediateFlatMap. This allows creating flat-mapped providers based off of RegistryEntries lazily during bootstrap phase, where resolving their value is not possible, without paying for the extra overhead post-bootstrap, where immediateFlatMap can be used.

Link copied to clipboard
abstract fun <R> flatMap(transform: (T) -> Provider<R>): Provider<R>
Link copied to clipboard
open override fun get(): T
Link copied to clipboard
open operator fun <X> getValue(thisRef: X?, property: KProperty<*>?): T
Link copied to clipboard
abstract fun handleParentUpdated(updatedParent: Provider<*>)
Link copied to clipboard
abstract fun <R> immediateFlatMap(transform: (T) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> immediateFlatMapMutable(transform: (T) -> MutableProvider<R>): MutableProvider<R>
Link copied to clipboard
abstract fun <R> map(transform: (T) -> R): Provider<R>
Link copied to clipboard
abstract fun observe(action: () -> Unit)
Link copied to clipboard
abstract fun <R : Any> observeWeak(owner: R, action: (owner: R) -> Unit)
Link copied to clipboard
abstract fun removeStrongChild(child: Provider<*>)
Link copied to clipboard
abstract fun removeWeakChild(child: Provider<*>)
Link copied to clipboard
abstract fun <R> strongFlatMap(transform: (T) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> strongImmediateFlatMap(transform: (T) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> strongImmediateFlatMapMutable(transform: (T) -> MutableProvider<R>): MutableProvider<R>
Link copied to clipboard
abstract fun <R> strongMap(transform: (T) -> R): Provider<R>
Link copied to clipboard
abstract fun subscribe(action: (value: T) -> Unit)
Link copied to clipboard
abstract fun <R : Any> subscribeWeak(owner: R, action: (owner: R, value: T) -> Unit)
Link copied to clipboard
abstract fun unobserve(action: () -> Unit)
Link copied to clipboard
abstract fun <R : Any> unobserveWeak(owner: R)
abstract fun <R : Any> unobserveWeak(owner: R, action: (R) -> Unit)
Link copied to clipboard
abstract fun unsubscribe(action: (T) -> Unit)
Link copied to clipboard
abstract fun <R : Any> unsubscribeWeak(owner: R)
abstract fun <R : Any> unsubscribeWeak(owner: R, action: (R, T) -> Unit)