net.minecraft.world.item

public record EitherHolder<T>

cyo
net.minecraft.world.item.EitherHolder
net.minecraft.class_9791
net.minecraft.registry.entry.LazyRegistryEntryReference

Field summary

Modifier and TypeField
private final com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>>
a
contents
comp_3636
contents

Constructor summary

ModifierConstructor
public (Holder<T> entry)
public (ResourceKey<T> key)
public (com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>> arg0)

Method summary

Modifier and TypeMethod
public static <T> com.mojang.serialization.Codec<EitherHolder<T>>
a(alf<js<T>> arg0, com.mojang.serialization.Codec<jf<T>> arg1)
codec(ResourceKey<Registry<T>> arg0, com.mojang.serialization.Codec<Holder<T>> arg1)
method_60736(class_5321<class_2378<T>> arg0, com.mojang.serialization.Codec<class_6880<T>> arg1)
createCodec(RegistryKey<Registry<T>> registryRef, com.mojang.serialization.Codec<RegistryEntry<T>> entryCodec)
public static <T> StreamCodec<RegistryFriendlyByteBuf, EitherHolder<T>>
a(alf<js<T>> arg0, yw<wj, jf<T>> arg1)
streamCodec(ResourceKey<Registry<T>> arg0, StreamCodec<RegistryFriendlyByteBuf, Holder<T>> arg1)
method_60737(class_5321<class_2378<T>> arg0, class_9139<class_9129, class_6880<T>> arg1)
createPacketCodec(RegistryKey<Registry<T>> registryRef, PacketCodec<RegistryByteBuf, RegistryEntry<T>> entryPacketCodec)
public Optional<T>
a(js<T> arg0)
unwrap(Registry<T> arg0)
method_60740(class_2378<T> arg0)
resolveValue(Registry<T> registry)
public Optional<Holder<T>>
a(jh$a arg0)
unwrap(HolderLookup$Provider arg0)
method_60739(class_7225$class_7874 arg0)
resolveEntry(RegistryWrapper$WrapperLookup registries)
public Optional<ResourceKey<T>>
a()
key()
method_67385()
getKey()
public com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>>
b()
contents()
comp_3636()
contents()