Package net.minecraft.registry.entry
Record Class LazyRegistryEntryReference<T>
java.lang.Object
java.lang.Record
net.minecraft.registry.entry.LazyRegistryEntryReference<T>
- Record Components:
contents
-
public record LazyRegistryEntryReference<T>(com.mojang.datafixers.util.Either<RegistryEntry<T>,RegistryKey<T>> contents)
extends Record
- Mappings:
Namespace Name named net/minecraft/registry/entry/LazyRegistryEntryReference
intermediary net/minecraft/class_9791
official czl
named contents
intermediary comp_3636
official a
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.datafixers.util.Either
<RegistryEntry<T>, RegistryKey<T>> The field for thecontents
record component. -
Constructor Summary
ConstructorsConstructorDescriptionLazyRegistryEntryReference
(com.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> either) LazyRegistryEntryReference
(RegistryEntry<T> entry) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.datafixers.util.Either
<RegistryEntry<T>, RegistryKey<T>> contents()
Returns the value of thecontents
record component.static <T> com.mojang.serialization.Codec
<LazyRegistryEntryReference<T>> createCodec
(RegistryKey<Registry<T>> registryRef, com.mojang.serialization.Codec<RegistryEntry<T>> entryCodec) static <T> PacketCodec
<RegistryByteBuf, LazyRegistryEntryReference<T>> createPacketCodec
(RegistryKey<Registry<T>> registryRef, PacketCodec<RegistryByteBuf, RegistryEntry<T>> entryPacketCodec) final boolean
Indicates whether some other object is "equal to" this one.getKey()
final int
hashCode()
Returns a hash code value for this object.resolveEntry
(RegistryWrapper.WrapperLookup registries) resolveValue
(Registry<T> registry) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
contents
The field for thecontents
record component.
-
-
Constructor Details
-
LazyRegistryEntryReference
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V
intermediary <init>
Lnet/minecraft/class_9791;<init>(Lnet/minecraft/class_6880;)V
official <init>
Lczl;<init>(Ljg;)V
-
LazyRegistryEntryReference
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;<init>(Lnet/minecraft/registry/RegistryKey;)V
intermediary <init>
Lnet/minecraft/class_9791;<init>(Lnet/minecraft/class_5321;)V
official <init>
Lczl;<init>(Lalq;)V
-
LazyRegistryEntryReference
public LazyRegistryEntryReference(com.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> either)
-
-
Method Details
-
createCodec
public static <T> com.mojang.serialization.Codec<LazyRegistryEntryReference<T>> createCodec(RegistryKey<Registry<T>> registryRef, com.mojang.serialization.Codec<RegistryEntry<T>> entryCodec) - Mappings:
Namespace Name Mixin selector named createCodec
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;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
Lczl;a(Lalq;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
createPacketCodec
public static <T> PacketCodec<RegistryByteBuf,LazyRegistryEntryReference<T>> createPacketCodec(RegistryKey<Registry<T>> registryRef, PacketCodec<RegistryByteBuf, RegistryEntry<T>> entryPacketCodec) - Mappings:
Namespace Name Mixin selector named createPacketCodec
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;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
Lczl;a(Lalq;Lze;)Lze;
-
resolveValue
- Mappings:
Namespace Name Mixin selector named resolveValue
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;resolveValue(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
Lczl;a(Ljt;)Ljava/util/Optional;
-
resolveEntry
- Mappings:
Namespace Name Mixin selector named resolveEntry
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;resolveEntry(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
Lczl;a(Lji$a;)Ljava/util/Optional;
-
getKey
- Mappings:
Namespace Name Mixin selector named getKey
Lnet/minecraft/registry/entry/LazyRegistryEntryReference;getKey()Ljava/util/Optional;
intermediary method_67385
Lnet/minecraft/class_9791;method_67385()Ljava/util/Optional;
official a
Lczl;a()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)
. -
contents
Returns the value of thecontents
record component.- Returns:
- the value of the
contents
record component
-