net.minecraft.world.item

public record EitherHolder<T>

cwp
net.minecraft.world.item.EitherHolder
net.minecraft.class_9791
net.minecraft.registry.RegistryPair
net.minecraft.world.item.EitherHolder

Field summary

Modifier and TypeField
private final Optional<Holder<T>>
a
holder
comp_2831
entry
private final ResourceKey<T>
b
key
comp_2832
key

Constructor summary

ModifierConstructor
public (Holder<T> entry)
public (ResourceKey<T> key)
public (Optional<Holder<T>> arg0, ResourceKey<T> arg1)

Method summary

Modifier and TypeMethod
public static <T> com.mojang.serialization.Codec<EitherHolder<T>>
a(aly<kd<T>> arg0, com.mojang.serialization.Codec<jq<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(aly<kd<T>> arg0, zt<xg, jq<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 com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>>
a()
asEither()
method_60734()
asEither()
public static <T> EitherHolder<T>
a(com.mojang.datafixers.util.Either<jq<T>, aly<T>> arg0)
fromEither(com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>> arg0)
method_60738(com.mojang.datafixers.util.Either<class_6880<T>, class_5321<T>> arg0)
create(com.mojang.datafixers.util.Either<RegistryEntry<T>, RegistryKey<T>> entryOrKey)
public Optional<T>
a(kd<T> arg0)
unwrap(Registry<T> arg0)
method_60740(class_2378<T> arg0)
getValue(Registry<T> registry)
public Optional<Holder<T>>
a(js$a arg0)
unwrap(HolderLookup$Provider arg0)
method_60739(class_7225$class_7874 arg0)
getEntry(RegistryWrapper$WrapperLookup registries)
public Optional<Holder<T>>
b()
holder()
comp_2831()
entry()
public ResourceKey<T>
c()
key()
comp_2832()
key()