- Type Parameters:
T
- the type of the registry entry
- All Known Subinterfaces:
Attribute
,BannerPattern
,Block
,BlockSoundType
,ChatType
,DataComponent<T>
,Dialog
,EntityType
,FeatureFlag
,Fluid
,GameEvent
,Holder.Direct<T>
,Instrument
,JukeboxSong
,Material
,PaintingVariant
,Particle
,PotionEffect
,PotionType
,RegistryKey<T>
,StaticProtocolObject<T>
,StatisticType
,TrimMaterial
,TrimPattern
,VillagerProfession
- All Known Implementing Classes:
ArgumentParserType
,BuiltinSoundEvent
,Dialog.Confirmation
,Dialog.DialogList
,Dialog.MultiAction
,Dialog.Notice
,Dialog.ServerLinks
,InstrumentImpl
,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
Represents either a reference to a registry entry RegistryKey
or a direct registry value.
Whether registry values implement this type depends on client support for direct values.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable RegistryKey
<T> asKey()
default T
asValue()
codec
(Registries.Selector<T> selector, Codec<T> registryCodec) default boolean
isDirect()
static <T extends Holder<T>>
NetworkBuffer.Type<Holder<T>> networkType
(Registries.Selector<T> selector, NetworkBuffer.Type<T> registryNetworkType) default T
resolve
(DynamicRegistry<T> registry) default Either
<RegistryKey<T>, T> unwrap()
-
Method Details
-
networkType
static <T extends Holder<T>> NetworkBuffer.Type<Holder<T>> networkType(Registries.Selector<T> selector, NetworkBuffer.Type<T> registryNetworkType) -
codec
static <T extends Holder<T>> Codec<Holder<T>> codec(Registries.Selector<T> selector, Codec<T> registryCodec) -
isDirect
default boolean isDirect() -
asKey
-
asValue
-
unwrap
-
resolve
-