Uses of Record Class
net.minecraft.world.item.EitherHolder
-
Uses of EitherHolder in net.minecraft.world.item
Modifier and TypeFieldDescriptionprivate final EitherHolder
<JukeboxSong> JukeboxPlayable.song
The field for thesong
record component.Modifier and TypeMethodDescriptionstatic <T> EitherHolder
<T> EitherHolder.fromEither
(com.mojang.datafixers.util.Either<Holder<T>, ResourceKey<T>> p_350717_) JukeboxPlayable.song()
Returns the value of thesong
record component.Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec
<EitherHolder<T>> EitherHolder.codec
(ResourceKey<Registry<T>> p_350627_, com.mojang.serialization.Codec<Holder<T>> p_350442_) static <T> StreamCodec
<RegistryFriendlyByteBuf, EitherHolder<T>> EitherHolder.streamCodec
(ResourceKey<Registry<T>> p_350628_, StreamCodec<RegistryFriendlyByteBuf, Holder<T>> p_350420_) ModifierConstructorDescriptionJukeboxPlayable
(EitherHolder<JukeboxSong> song, boolean showInTooltip) Creates an instance of aJukeboxPlayable
record class.