Package net.minecraft.registry.tag
Record Class TagKey<T>
java.lang.Object
java.lang.Record
net.minecraft.registry.tag.TagKey<T>
- Record Components:
- registry-
- id-
- Mappings:
- Namespace - Name - official - anl- intermediary - net/minecraft/class_6862- named - net/minecraft/registry/tag/TagKey- official - a- intermediary - comp_326- named - registry- official - b- intermediary - comp_327- named - id
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionTagKey(RegistryKey<? extends Registry<T>> registryKey, Identifier identifier) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<TagKey<T>>codec(RegistryKey<? extends Registry<T>> registry) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisOf(RegistryKey<? extends Registry<?>> registryRef) static <T> TagKey<T>of(RegistryKey<? extends Registry<T>> registry, Identifier id) RegistryKey<? extends Registry<T>>registry()Returns the value of theregistryrecord component.toString()Returns a string representation of this record class.tryCast(RegistryKey<? extends Registry<E>> registryRef) static <T> com.mojang.serialization.Codec<TagKey<T>>unprefixedCodec(RegistryKey<? extends Registry<T>> registry) 
- 
Field Details- 
registryThe field for theregistryrecord component.
- 
idThe field for theidrecord component.
- 
INTERNER- Mappings:
- Namespace - Name - Mixin selector - official - c- Lanl;c:Lcom/google/common/collect/Interner;- intermediary - field_36394- Lnet/minecraft/class_6862;field_36394:Lcom/google/common/collect/Interner;- named - INTERNER- Lnet/minecraft/registry/tag/TagKey;INTERNER:Lcom/google/common/collect/Interner;
 
 
- 
- 
Constructor Details- 
TagKeyDeprecated.
 
- 
- 
Method Details- 
unprefixedCodecpublic static <T> com.mojang.serialization.Codec<TagKey<T>> unprefixedCodec(RegistryKey<? extends Registry<T>> registry) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lanl;a(Lacp;)Lcom/mojang/serialization/Codec;- intermediary - method_40090- Lnet/minecraft/class_6862;method_40090(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;- named - unprefixedCodec- Lnet/minecraft/registry/tag/TagKey;unprefixedCodec(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
 
- 
codecpublic static <T> com.mojang.serialization.Codec<TagKey<T>> codec(RegistryKey<? extends Registry<T>> registry) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lanl;b(Lacp;)Lcom/mojang/serialization/Codec;- intermediary - method_40093- Lnet/minecraft/class_6862;method_40093(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;- named - codec- Lnet/minecraft/registry/tag/TagKey;codec(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
 
- 
of- Mappings:
- Namespace - Name - Mixin selector - official - a- Lanl;a(Lacp;Lacq;)Lanl;- intermediary - method_40092- Lnet/minecraft/class_6862;method_40092(Lnet/minecraft/class_5321;Lnet/minecraft/class_2960;)Lnet/minecraft/class_6862;- named - of- Lnet/minecraft/registry/tag/TagKey;of(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/util/Identifier;)Lnet/minecraft/registry/tag/TagKey;
 
- 
isOf- Mappings:
- Namespace - Name - Mixin selector - official - c- Lanl;c(Lacp;)Z- intermediary - method_41007- Lnet/minecraft/class_6862;method_41007(Lnet/minecraft/class_5321;)Z- named - isOf- Lnet/minecraft/registry/tag/TagKey;isOf(Lnet/minecraft/registry/RegistryKey;)Z
 
- 
tryCast- Mappings:
- Namespace - Name - Mixin selector - official - d- Lanl;d(Lacp;)Ljava/util/Optional;- intermediary - method_41008- Lnet/minecraft/class_6862;method_41008(Lnet/minecraft/class_5321;)Ljava/util/Optional;- named - tryCast- Lnet/minecraft/registry/tag/TagKey;tryCast(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
registryReturns the value of theregistryrecord component.- Returns:
- the value of the registryrecord component
 
- 
idReturns the value of theidrecord component.- Returns:
- the value of the idrecord component
 
 
-