Package net.minecraft.registry
Record Class RegistryPair<T>
java.lang.Object
java.lang.Record
net.minecraft.registry.RegistryPair<T>
- Record Components:
- entry-
- key-
- Mappings:
- Namespace - Name - named - net/minecraft/registry/RegistryPair- intermediary - net/minecraft/class_9791- official - cvq- named - entry- intermediary - comp_2831- official - a- named - key- intermediary - comp_2832- official - b
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Optional<RegistryEntry<T>> The field for theentryrecord component.private final RegistryKey<T> The field for thekeyrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionRegistryPair(Optional<RegistryEntry<T>> optional, RegistryKey<T> registryKey) RegistryPair(RegistryEntry<T> entry) RegistryPair(RegistryKey<T> key) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> asEither()static <T> RegistryPair<T> create(com.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> entryOrKey) static <T> com.mojang.serialization.Codec<RegistryPair<T>> createCodec(RegistryKey<Registry<T>> registryRef, com.mojang.serialization.Codec<RegistryEntry<T>> entryCodec) static <T> PacketCodec<RegistryByteBuf, RegistryPair<T>> createPacketCodec(RegistryKey<Registry<T>> registryRef, PacketCodec<RegistryByteBuf, RegistryEntry<T>> entryPacketCodec) entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.getEntry(RegistryWrapper.WrapperLookup registries) final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details
- 
Constructor Details- 
RegistryPair- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/registry/RegistryPair;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V- intermediary - <init>- Lnet/minecraft/class_9791;<init>(Lnet/minecraft/class_6880;)V- official - <init>- Lcvq;<init>(Ljr;)V
 
- 
RegistryPair- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/registry/RegistryPair;<init>(Lnet/minecraft/registry/RegistryKey;)V- intermediary - <init>- Lnet/minecraft/class_9791;<init>(Lnet/minecraft/class_5321;)V- official - <init>- Lcvq;<init>(Laku;)V
 
- 
RegistryPair
 
- 
- 
Method Details- 
createCodecpublic static <T> com.mojang.serialization.Codec<RegistryPair<T>> createCodec(RegistryKey<Registry<T>> registryRef, com.mojang.serialization.Codec<RegistryEntry<T>> entryCodec) - Mappings:
- Namespace - Name - Mixin selector - named - createCodec- Lnet/minecraft/registry/RegistryPair;createCodec(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;- intermediary - method_60736- Lnet/minecraft/class_9791;method_60736(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;- official - a- Lcvq;a(Laku;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
 
- 
createPacketCodecpublic static <T> PacketCodec<RegistryByteBuf,RegistryPair<T>> createPacketCodec(RegistryKey<Registry<T>> registryRef, PacketCodec<RegistryByteBuf, RegistryEntry<T>> entryPacketCodec) - Mappings:
- Namespace - Name - Mixin selector - named - createPacketCodec- Lnet/minecraft/registry/RegistryPair;createPacketCodec(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_60737- Lnet/minecraft/class_9791;method_60737(Lnet/minecraft/class_5321;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lcvq;a(Laku;Lyn;)Lyn;
 
- 
asEither- Mappings:
- Namespace - Name - Mixin selector - named - asEither- Lnet/minecraft/registry/RegistryPair;asEither()Lcom/mojang/datafixers/util/Either;- intermediary - method_60734- Lnet/minecraft/class_9791;method_60734()Lcom/mojang/datafixers/util/Either;- official - a- Lcvq;a()Lcom/mojang/datafixers/util/Either;
 
- 
createpublic static <T> RegistryPair<T> create(com.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> entryOrKey) - Mappings:
- Namespace - Name - Mixin selector - named - create- Lnet/minecraft/registry/RegistryPair;create(Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/registry/RegistryPair;- intermediary - method_60738- Lnet/minecraft/class_9791;method_60738(Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/class_9791;- official - a- Lcvq;a(Lcom/mojang/datafixers/util/Either;)Lcvq;
 
- 
getValue- Mappings:
- Namespace - Name - Mixin selector - named - getValue- Lnet/minecraft/registry/RegistryPair;getValue(Lnet/minecraft/registry/Registry;)Ljava/util/Optional;- intermediary - method_60740- Lnet/minecraft/class_9791;method_60740(Lnet/minecraft/class_2378;)Ljava/util/Optional;- official - a- Lcvq;a(Lke;)Ljava/util/Optional;
 
- 
getEntry- Mappings:
- Namespace - Name - Mixin selector - named - getEntry- Lnet/minecraft/registry/RegistryPair;getEntry(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Ljava/util/Optional;- intermediary - method_60739- Lnet/minecraft/class_9791;method_60739(Lnet/minecraft/class_7225$class_7874;)Ljava/util/Optional;- official - a- Lcvq;a(Ljt$a;)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).
- 
entryReturns the value of theentryrecord component.- Returns:
- the value of the entryrecord component
 
- 
keyReturns the value of thekeyrecord component.- Returns:
- the value of the keyrecord component
 
 
-