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 aDummyRegistry
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAlias
(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.resources.ResourceLocation resourceLocation1) void
addCallback
(net.neoforged.neoforge.registries.callback.RegistryCallback<T> registryCallback) net.minecraft.core.HolderLookup.RegistryLookup
<T> asLookup()
void
byId
(int p_122651_) boolean
containsKey
(net.minecraft.resources.ResourceKey<T> p_175475_) boolean
containsKey
(net.minecraft.resources.ResourceLocation p_123011_) boolean
containsValue
(T t) net.minecraft.core.Holder.Reference
<T> createIntrusiveHolder
(T p_206068_) net.minecraft.resources.ResourceLocation
Returns the value of thedefaultId
record component.Returns the value of thedefaultValue
record component.boolean
doesSync()
entrySet()
final boolean
Indicates 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> A
getData
(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) int
int
getId
(net.minecraft.resources.ResourceLocation resourceLocation) int
@Nullable net.minecraft.resources.ResourceLocation
int
getMaxId()
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 int
hashCode()
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 theregistryKey
record component.com.mojang.serialization.Lifecycle
void
net.minecraft.resources.ResourceKey
<T> net.minecraft.resources.ResourceLocation
resolve
(net.minecraft.resources.ResourceLocation resourceLocation) int
size()
final String
toString()
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, wait
Methods inherited from interface net.minecraft.core.HolderOwner
canSerializeIn
Methods inherited from interface net.minecraft.core.IdMap
byIdOrThrow, getIdOrThrow
Methods inherited from interface net.neoforged.neoforge.registries.IRegistryExtension
addCallback, getKeyOrNull
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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 aDummyRegistry
record class.- Parameters:
registryKey
- the value for theregistryKey
record componentdefaultId
- the value for thedefaultId
record componentdefaultValue
- the value for thedefaultValue
record component
-
-
Method Details
-
key
- Specified by:
key
in interfacenet.minecraft.core.Registry<T>
-
getKey
- Specified by:
getKey
in interfacenet.minecraft.core.Registry<T>
-
getResourceKey
- Specified by:
getResourceKey
in interfacenet.minecraft.core.Registry<T>
-
getId
-
byId
- Specified by:
byId
in interfacenet.minecraft.core.IdMap<T>
-
size
public int size()- Specified by:
size
in interfacenet.minecraft.core.IdMap<T>
-
get
- Specified by:
get
in interfacenet.minecraft.core.Registry<T>
-
get
- Specified by:
get
in interfacenet.minecraft.core.Registry<T>
-
registrationInfo
public Optional<net.minecraft.core.RegistrationInfo> registrationInfo(net.minecraft.resources.ResourceKey<T> resourceKey) - Specified by:
registrationInfo
in interfacenet.minecraft.core.Registry<T>
-
registryLifecycle
public com.mojang.serialization.Lifecycle registryLifecycle()- Specified by:
registryLifecycle
in interfacenet.minecraft.core.Registry<T>
-
getAny
- Specified by:
getAny
in interfacenet.minecraft.core.Registry<T>
-
keySet
- Specified by:
keySet
in interfacenet.minecraft.core.Registry<T>
-
entrySet
- Specified by:
entrySet
in interfacenet.minecraft.core.Registry<T>
-
registryKeySet
- Specified by:
registryKeySet
in interfacenet.minecraft.core.Registry<T>
-
getRandom
public Optional<net.minecraft.core.Holder.Reference<T>> getRandom(net.minecraft.util.RandomSource p_235781_) - Specified by:
getRandom
in interfacenet.minecraft.core.Registry<T>
-
containsKey
public boolean containsKey(net.minecraft.resources.ResourceLocation p_123011_) - Specified by:
containsKey
in interfacenet.minecraft.core.Registry<T>
-
containsKey
- Specified by:
containsKey
in interfacenet.minecraft.core.Registry<T>
-
freeze
- Specified by:
freeze
in interfacenet.minecraft.core.Registry<T>
-
createIntrusiveHolder
- Specified by:
createIntrusiveHolder
in interfacenet.minecraft.core.Registry<T>
-
getHolder
- Specified by:
getHolder
in interfacenet.minecraft.core.Registry<T>
-
getHolder
public Optional<net.minecraft.core.Holder.Reference<T>> getHolder(net.minecraft.resources.ResourceLocation resourceLocation) - Specified by:
getHolder
in interfacenet.minecraft.core.Registry<T>
-
getHolder
public Optional<net.minecraft.core.Holder.Reference<T>> getHolder(net.minecraft.resources.ResourceKey<T> p_206050_) - Specified by:
getHolder
in interfacenet.minecraft.core.Registry<T>
-
wrapAsHolder
- Specified by:
wrapAsHolder
in interfacenet.minecraft.core.Registry<T>
-
holders
- Specified by:
holders
in interfacenet.minecraft.core.Registry<T>
-
getTag
public Optional<net.minecraft.core.HolderSet.Named<T>> getTag(net.minecraft.tags.TagKey<T> p_206052_) - Specified by:
getTag
in interfacenet.minecraft.core.Registry<T>
-
getOrCreateTag
- Specified by:
getOrCreateTag
in 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:
getTags
in interfacenet.minecraft.core.Registry<T>
-
getTagNames
- Specified by:
getTagNames
in interfacenet.minecraft.core.Registry<T>
-
resetTags
public void resetTags()- Specified by:
resetTags
in 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:
bindTags
in interfacenet.minecraft.core.Registry<T>
-
holderOwner
- Specified by:
holderOwner
in interfacenet.minecraft.core.Registry<T>
-
asLookup
- Specified by:
asLookup
in interfacenet.minecraft.core.Registry<T>
-
iterator
-
doesSync
public boolean doesSync()- Specified by:
doesSync
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getMaxId
public int getMaxId()- Specified by:
getMaxId
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
addCallback
public void addCallback(net.neoforged.neoforge.registries.callback.RegistryCallback<T> registryCallback) - Specified by:
addCallback
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
addAlias
public void addAlias(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.resources.ResourceLocation resourceLocation1) - Specified by:
addAlias
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
resolve
public net.minecraft.resources.ResourceLocation resolve(net.minecraft.resources.ResourceLocation resourceLocation) - Specified by:
resolve
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
resolve
public net.minecraft.resources.ResourceKey<T> resolve(net.minecraft.resources.ResourceKey<T> resourceKey) - Specified by:
resolve
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getId
- Specified by:
getId
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
getId
public int getId(net.minecraft.resources.ResourceLocation resourceLocation) - Specified by:
getId
in interfacenet.neoforged.neoforge.registries.IRegistryExtension<T>
-
containsValue
- Specified by:
containsValue
in 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:
getData
in 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:
getDataMap
in 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 theregistryKey
record component.- Returns:
- the value of the
registryKey
record component
-
defaultId
public net.minecraft.resources.ResourceLocation defaultId()Returns the value of thedefaultId
record component.- Returns:
- the value of the
defaultId
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-