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>,net.neoforged.neoforge.registries.IRegistryExtension<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 TypeMethodDescriptionvoidaddAlias(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.resources.ResourceLocation resourceLocation1) voidaddCallback(net.neoforged.neoforge.registries.callback.RegistryCallback<T> registryCallback) net.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_) booleancontainsValue(T t) 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.booleandoesSync()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_) getAny()<A> AgetData(net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> dataMapType, net.minecraft.resources.ResourceKey<T> resourceKey) getDataMap(net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> dataMapType) getHolder(int p_206051_) getHolder(net.minecraft.resources.ResourceLocation resourceLocation) intintgetId(net.minecraft.resources.ResourceLocation resourceLocation) int@Nullable net.minecraft.resources.ResourceLocationintgetMaxId()net.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()Optional<net.minecraft.core.RegistrationInfo> registrationInfo(net.minecraft.resources.ResourceKey<T> resourceKey) net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> Returns the value of theregistryKeyrecord component.com.mojang.serialization.Lifecyclevoidnet.minecraft.resources.ResourceKey<T> net.minecraft.resources.ResourceLocationresolve(net.minecraft.resources.ResourceLocation resourceLocation) intsize()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
byIdOrThrow, getIdOrThrowMethods inherited from interface net.neoforged.neoforge.registries.IRegistryExtension
addCallback, getKeyOrNullMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.core.Registry
asHolderIdMap, asTagAddingLookup, byNameCodec, getHolderOrThrow, getOptional, getOptional, getOrThrow, getRandomElementOf, 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>
-
registrationInfo
public Optional<net.minecraft.core.RegistrationInfo> registrationInfo(net.minecraft.resources.ResourceKey<T> resourceKey) - Specified by:
registrationInfoin interfacenet.minecraft.core.Registry<T>
-
registryLifecycle
public com.mojang.serialization.Lifecycle registryLifecycle()- Specified by:
registryLifecyclein interfacenet.minecraft.core.Registry<T>
-
getAny
- Specified by:
getAnyin 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.ResourceLocation resourceLocation) - 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
-
doesSync
public boolean doesSync()- Specified by:
doesSyncin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getMaxId
public int getMaxId()- Specified by:
getMaxIdin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
addCallback
public void addCallback(net.neoforged.neoforge.registries.callback.RegistryCallback<T> registryCallback) - Specified by:
addCallbackin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
addAlias
public void addAlias(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.resources.ResourceLocation resourceLocation1) - Specified by:
addAliasin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
resolve
public net.minecraft.resources.ResourceLocation resolve(net.minecraft.resources.ResourceLocation resourceLocation) - Specified by:
resolvein interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
resolve
public net.minecraft.resources.ResourceKey<T> resolve(net.minecraft.resources.ResourceKey<T> resourceKey) - Specified by:
resolvein interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getId
- Specified by:
getIdin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getId
public int getId(net.minecraft.resources.ResourceLocation resourceLocation) - Specified by:
getIdin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
containsValue
- Specified by:
containsValuein interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getData
@Nullable public <A> A getData(net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> dataMapType, net.minecraft.resources.ResourceKey<T> resourceKey) - Specified by:
getDatain interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getDataMap
public <A> Map<net.minecraft.resources.ResourceKey<T>,A> getDataMap(net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> dataMapType) - Specified by:
getDataMapin interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
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
-