Record Class DummyRegistry<T>
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.dummy.DummyRegistry<T>
- All Implemented Interfaces:
 com.mojang.serialization.Keyable,Iterable<T>,net.minecraft.core.HolderOwner<T>,net.minecraft.core.IdMap<T>,net.minecraft.core.Registry<T>
- 
Field Summary
Fields inherited from interface net.minecraft.core.IdMap
DEFAULT - 
Constructor Summary
ConstructorsConstructorDescriptionDummyRegistry(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.resources.ResourceLocation defaultId, T defaultValue) Creates an instance of aDummyRegistryrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderLookup.RegistryLookup<T>asLookup()voidbyId(int p_122651_) booleancontainsKey(net.minecraft.resources.ResourceKey<T> p_175475_) booleancontainsKey(net.minecraft.resources.ResourceLocation p_123011_) net.minecraft.core.Holder.Reference<T>createIntrusiveHolder(T p_206068_) net.minecraft.resources.ResourceLocationReturns the value of thedefaultIdrecord component.Returns the value of thedefaultValuerecord component.entrySet()final booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.Registry<T>freeze()get(@Nullable net.minecraft.resources.ResourceLocation p_123002_) getHolder(int p_206051_) int@Nullable net.minecraft.resources.ResourceLocationnet.minecraft.core.HolderSet.Named<T>getOrCreateTag(net.minecraft.tags.TagKey<T> p_206045_) getRandom(net.minecraft.util.RandomSource p_235781_) getResourceKey(T p_123008_) Stream<com.mojang.datafixers.util.Pair<net.minecraft.tags.TagKey<T>,net.minecraft.core.HolderSet.Named<T>>> getTags()final inthashCode()Returns a hash code value for this object.net.minecraft.core.HolderOwner<T>holders()iterator()net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>key()Set<net.minecraft.resources.ResourceLocation>keySet()com.mojang.serialization.Lifecyclenet.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>Returns the value of theregistryKeyrecord component.com.mojang.serialization.Lifecyclevoidintsize()final StringtoString()Returns a string representation of this record class.net.minecraft.core.Holder<T>wrapAsHolder(T p_263382_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.core.HolderOwner
canSerializeInMethods inherited from interface net.minecraft.core.IdMap
byIdOrThrowMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.core.Registry
asHolderIdMap, asTagAddingLookup, byNameCodec, getHolderOrThrow, getOptional, getOptional, getOrThrow, getTagOrEmpty, holderByNameCodec, keys, stream 
- 
Constructor Details
- 
DummyRegistry
public DummyRegistry(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.resources.ResourceLocation defaultId, T defaultValue) Creates an instance of aDummyRegistryrecord class.- Parameters:
 registryKey- the value for theregistryKeyrecord componentdefaultId- the value for thedefaultIdrecord componentdefaultValue- the value for thedefaultValuerecord component
 
 - 
 - 
Method Details
- 
key
- Specified by:
 keyin interfacenet.minecraft.core.Registry<T>
 - 
getKey
- Specified by:
 getKeyin interfacenet.minecraft.core.Registry<T>
 - 
getResourceKey
- Specified by:
 getResourceKeyin interfacenet.minecraft.core.Registry<T>
 - 
getId
 - 
byId
- Specified by:
 byIdin interfacenet.minecraft.core.IdMap<T>
 - 
size
public int size()- Specified by:
 sizein interfacenet.minecraft.core.IdMap<T>
 - 
get
- Specified by:
 getin interfacenet.minecraft.core.Registry<T>
 - 
get
- Specified by:
 getin interfacenet.minecraft.core.Registry<T>
 - 
lifecycle
- Specified by:
 lifecyclein interfacenet.minecraft.core.Registry<T>
 - 
registryLifecycle
public com.mojang.serialization.Lifecycle registryLifecycle()- Specified by:
 registryLifecyclein interfacenet.minecraft.core.Registry<T>
 - 
keySet
- Specified by:
 keySetin interfacenet.minecraft.core.Registry<T>
 - 
entrySet
- Specified by:
 entrySetin interfacenet.minecraft.core.Registry<T>
 - 
registryKeySet
- Specified by:
 registryKeySetin interfacenet.minecraft.core.Registry<T>
 - 
getRandom
public Optional<net.minecraft.core.Holder.Reference<T>> getRandom(net.minecraft.util.RandomSource p_235781_) - Specified by:
 getRandomin interfacenet.minecraft.core.Registry<T>
 - 
containsKey
public boolean containsKey(net.minecraft.resources.ResourceLocation p_123011_) - Specified by:
 containsKeyin interfacenet.minecraft.core.Registry<T>
 - 
containsKey
- Specified by:
 containsKeyin interfacenet.minecraft.core.Registry<T>
 - 
freeze
- Specified by:
 freezein interfacenet.minecraft.core.Registry<T>
 - 
createIntrusiveHolder
- Specified by:
 createIntrusiveHolderin interfacenet.minecraft.core.Registry<T>
 - 
getHolder
- Specified by:
 getHolderin interfacenet.minecraft.core.Registry<T>
 - 
getHolder
public Optional<net.minecraft.core.Holder.Reference<T>> getHolder(net.minecraft.resources.ResourceKey<T> p_206050_) - Specified by:
 getHolderin interfacenet.minecraft.core.Registry<T>
 - 
wrapAsHolder
- Specified by:
 wrapAsHolderin interfacenet.minecraft.core.Registry<T>
 - 
holders
- Specified by:
 holdersin interfacenet.minecraft.core.Registry<T>
 - 
getTag
public Optional<net.minecraft.core.HolderSet.Named<T>> getTag(net.minecraft.tags.TagKey<T> p_206052_) - Specified by:
 getTagin interfacenet.minecraft.core.Registry<T>
 - 
getOrCreateTag
- Specified by:
 getOrCreateTagin interfacenet.minecraft.core.Registry<T>
 - 
getTags
public Stream<com.mojang.datafixers.util.Pair<net.minecraft.tags.TagKey<T>,net.minecraft.core.HolderSet.Named<T>>> getTags()- Specified by:
 getTagsin interfacenet.minecraft.core.Registry<T>
 - 
getTagNames
- Specified by:
 getTagNamesin interfacenet.minecraft.core.Registry<T>
 - 
resetTags
public void resetTags()- Specified by:
 resetTagsin interfacenet.minecraft.core.Registry<T>
 - 
bindTags
public void bindTags(Map<net.minecraft.tags.TagKey<T>, List<net.minecraft.core.Holder<T>>> p_205997_) - Specified by:
 bindTagsin interfacenet.minecraft.core.Registry<T>
 - 
holderOwner
- Specified by:
 holderOwnerin interfacenet.minecraft.core.Registry<T>
 - 
asLookup
- Specified by:
 asLookupin interfacenet.minecraft.core.Registry<T>
 - 
iterator
 - 
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. - 
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. - 
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). - 
registryKey
Returns the value of theregistryKeyrecord component.- Returns:
 - the value of the 
registryKeyrecord component 
 - 
defaultId
public net.minecraft.resources.ResourceLocation defaultId()Returns the value of thedefaultIdrecord component.- Returns:
 - the value of the 
defaultIdrecord component 
 - 
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
 - the value of the 
defaultValuerecord component 
 
 -