Package net.minestom.server.registry
Interface RegistryKey<T>
- Type Parameters:
T
- the type of the registry entry
- All Superinterfaces:
Holder<T>
,net.kyori.adventure.key.Keyed
- All Known Subinterfaces:
Attribute
,Block
,BlockSoundType
,DataComponent<T>
,EntityType
,FeatureFlag
,Fluid
,GameEvent
,Material
,Particle
,PotionEffect
,PotionType
,StaticProtocolObject<T>
,StatisticType
,VillagerProfession
- All Known Implementing Classes:
ArgumentParserType
,BlockSoundImpl
,Particle.Block
,Particle.BlockCrumble
,Particle.BlockMarker
,Particle.Dust
,Particle.DustColorTransition
,Particle.DustPillar
,Particle.EntityEffect
,Particle.FallingDust
,Particle.Item
,Particle.SculkCharge
,Particle.Shriek
,Particle.Simple
,Particle.TintedLeaves
,Particle.Trail
,Particle.Vibration
,RecipeBookCategory
,RecipeDisplayType
,RecipeType
,SlotDisplayType
,VillagerProfessionImpl
,VillagerType
@NonExtendable
public non-sealed interface RegistryKey<T>
extends Holder<T>, net.kyori.adventure.key.Keyed
Represents a reference to a
Registry
entry.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.registry.Holder
Holder.Direct<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull Codec
<RegistryKey<T>> codec
(Registries.Selector<T> selector) default @NotNull String
name()
static <T> @NotNull NetworkBuffer.Type
<RegistryKey<T>> networkType
(Registries.Selector<T> selector) static <T> @NotNull Codec
<RegistryKey<T>> static <T> @NotNull NetworkBuffer.Type
<RegistryKey<T>> static <T> @NotNull RegistryKey
<T> Creates a newRegistryKey
from the given raw string.static <T> @NotNull RegistryKey
<T> unsafeOf
(@NotNull net.kyori.adventure.key.Key key) Creates a newRegistryKey
from the given raw string.Methods inherited from interface net.minestom.server.registry.Holder
asKey, asValue, isDirect, resolve, unwrap
Methods inherited from interface net.kyori.adventure.key.Keyed
key
-
Method Details
-
networkType
static <T> @NotNull NetworkBuffer.Type<RegistryKey<T>> networkType(@NotNull Registries.Selector<T> selector) -
codec
-
uncheckedNetworkType
-
uncheckedCodec
-
unsafeOf
Creates a newRegistryKey
from the given raw string. Should not be used externally. Registry keys are returned fromDynamicRegistry.register(Key, Object)
. -
unsafeOf
@Internal @NotNull static <T> @NotNull RegistryKey<T> unsafeOf(@NotNull @NotNull net.kyori.adventure.key.Key key) Creates a newRegistryKey
from the given raw string. Should not be used externally. Registry keys are returned fromDynamicRegistry.register(Key, Object)
. -
name
-