Package net.minecraft.tag
Record Class TagKey<T>
java.lang.Object
java.lang.Record
net.minecraft.tag.TagKey<T>
- Record Components:
registry-id-
- Mappings:
Namespace Name official aieintermediary net/minecraft/class_6862named net/minecraft/tag/TagKeyofficial aintermediary comp_326named registryofficial bintermediary comp_327named id
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTagKey(RegistryKey<? extends Registry<T>> registryKey, Identifier identifier) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.static <T> com.mojang.serialization.Codec<TagKey<T>>identifierCodec(RegistryKey<? extends Registry<T>> registry) booleanmethod_41007(RegistryKey<? extends Registry<?>> registryKey) method_41008(RegistryKey<? extends Registry<E>> registryKey) static <T> TagKey<T>of(RegistryKey<? extends Registry<T>> registry, Identifier id) RegistryKey<? extends Registry<T>>registry()Returns the value of theregistryrecord component.static <T> com.mojang.serialization.Codec<TagKey<T>>stringCodec(RegistryKey<? extends Registry<T>> registry) toString()Returns a string representation of this record class.
-
Field Details
-
registry
The field for theregistryrecord component. -
id
The field for theidrecord component. -
INTERNER
- Mappings:
Namespace Name Mixin selector official cLaie;c:Lcom/google/common/collect/Interner;intermediary field_36394Lnet/minecraft/class_6862;field_36394:Lcom/google/common/collect/Interner;named INTERNERLnet/minecraft/tag/TagKey;INTERNER:Lcom/google/common/collect/Interner;
-
-
Constructor Details
-
TagKey
Deprecated.
-
-
Method Details
-
identifierCodec
public static <T> com.mojang.serialization.Codec<TagKey<T>> identifierCodec(RegistryKey<? extends Registry<T>> registry) - Mappings:
Namespace Name Mixin selector official aLaie;a(Lyr;)Lcom/mojang/serialization/Codec;intermediary method_40090Lnet/minecraft/class_6862;method_40090(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;named identifierCodecLnet/minecraft/tag/TagKey;identifierCodec(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
-
stringCodec
public static <T> com.mojang.serialization.Codec<TagKey<T>> stringCodec(RegistryKey<? extends Registry<T>> registry) - Mappings:
Namespace Name Mixin selector official bLaie;b(Lyr;)Lcom/mojang/serialization/Codec;intermediary method_40093Lnet/minecraft/class_6862;method_40093(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;named stringCodecLnet/minecraft/tag/TagKey;stringCodec(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
-
of
- Mappings:
Namespace Name Mixin selector official aLaie;a(Lyr;Lys;)Laie;intermediary method_40092Lnet/minecraft/class_6862;method_40092(Lnet/minecraft/class_5321;Lnet/minecraft/class_2960;)Lnet/minecraft/class_6862;named ofLnet/minecraft/tag/TagKey;of(Lnet/minecraft/util/registry/RegistryKey;Lnet/minecraft/util/Identifier;)Lnet/minecraft/tag/TagKey;
-
method_41007
- Mappings:
Namespace Name Mixin selector official cLaie;c(Lyr;)Zintermediary method_41007Lnet/minecraft/class_6862;method_41007(Lnet/minecraft/class_5321;)Znamed method_41007Lnet/minecraft/tag/TagKey;method_41007(Lnet/minecraft/util/registry/RegistryKey;)Z
-
method_41008
- Mappings:
Namespace Name Mixin selector official dLaie;d(Lyr;)Ljava/util/Optional;intermediary method_41008Lnet/minecraft/class_6862;method_41008(Lnet/minecraft/class_5321;)Ljava/util/Optional;named method_41008Lnet/minecraft/tag/TagKey;method_41008(Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/Optional;
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-