Package net.minecraft.core
Interface Registry<T>
- All Known Subinterfaces:
DefaultedRegistry<T>
,WritableRegistry<T>
- All Known Implementing Classes:
DefaultedMappedRegistry
,MappedRegistry
,NamespacedDefaultedWrapper
,NamespacedWrapper
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionasLookup()
default HolderLookup.RegistryLookup<T>
void
default com.mojang.serialization.Codec<T>
boolean
containsKey
(ResourceKey<T> p_175475_) boolean
containsKey
(ResourceLocation p_123011_) createIntrusiveHolder
(T p_206068_) Set<Map.Entry<ResourceKey<T>,
T>> entrySet()
freeze()
get
(ResourceKey<T> p_122980_) get
(ResourceLocation p_123002_) getHolder
(int p_206051_) getHolder
(ResourceKey<T> p_206050_) default Holder.Reference<T>
getHolderOrThrow
(ResourceKey<T> p_249087_) int
getOptional
(ResourceKey<T> p_123010_) getOptional
(ResourceLocation p_123007_) getOrCreateTag
(TagKey<T> p_206045_) default T
getOrThrow
(ResourceKey<T> p_123014_) getRandom
(RandomSource p_235781_) getResourceKey
(T p_123008_) getTagOrEmpty
(TagKey<T> p_206059_) Stream<com.mojang.datafixers.util.Pair<TagKey<T>,
HolderSet.Named<T>>> getTags()
holders()
ResourceKey<? extends Registry<T>>
key()
default <U> Stream<U>
keys
(com.mojang.serialization.DynamicOps<U> p_123030_) keySet()
com.mojang.serialization.Lifecycle
static <T> T
static <V,
T extends V>
Tregister
(Registry<V> p_194580_, ResourceKey<V> p_194581_, T p_194582_) static <V,
T extends V>
Tregister
(Registry<V> p_122966_, ResourceLocation p_122967_, T p_122968_) static <T> Holder.Reference<T>
registerForHolder
(Registry<T> p_263347_, ResourceKey<T> p_263355_, T p_263428_) static <T> Holder.Reference<T>
registerForHolder
(Registry<T> p_263351_, ResourceLocation p_263363_, T p_263423_) Set<ResourceKey<T>>
com.mojang.serialization.Lifecycle
void
stream()
wrapAsHolder
(T p_263382_) Methods inherited from interface net.minecraft.core.IdMap
byId, byIdOrThrow, size
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
key
ResourceKey<? extends Registry<T>> key() -
byNameCodec
-
holderByNameCodec
-
keys
- Specified by:
keys
in interfacecom.mojang.serialization.Keyable
-
getKey
-
getResourceKey
-
getId
-
get
-
get
-
lifecycle
-
registryLifecycle
com.mojang.serialization.Lifecycle registryLifecycle() -
getOptional
-
getOptional
-
getOrThrow
-
keySet
Set<ResourceLocation> keySet() -
entrySet
Set<Map.Entry<ResourceKey<T>,T>> entrySet() -
registryKeySet
Set<ResourceKey<T>> registryKeySet() -
getRandom
-
stream
-
containsKey
-
containsKey
-
register
-
register
-
register
-
registerForHolder
static <T> Holder.Reference<T> registerForHolder(Registry<T> p_263347_, ResourceKey<T> p_263355_, T p_263428_) -
registerForHolder
static <T> Holder.Reference<T> registerForHolder(Registry<T> p_263351_, ResourceLocation p_263363_, T p_263423_) -
freeze
-
createIntrusiveHolder
-
getHolder
-
getHolder
-
wrapAsHolder
-
getHolderOrThrow
-
holders
Stream<Holder.Reference<T>> holders() -
getTag
-
getTagOrEmpty
-
getOrCreateTag
-
getTags
Stream<com.mojang.datafixers.util.Pair<TagKey<T>,HolderSet.Named<T>>> getTags() -
getTagNames
-
resetTags
void resetTags() -
bindTags
-
asHolderIdMap
-
holderOwner
HolderOwner<T> holderOwner() -
asLookup
HolderLookup.RegistryLookup<T> asLookup() -
asTagAddingLookup
-