Package net.minecraft.util.random
Class SimpleWeightedRandomList<E>
java.lang.Object
net.minecraft.util.random.WeightedRandomList<WeightedEntry.Wrapper<E>>
net.minecraft.util.random.SimpleWeightedRandomList<E>
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSimpleWeightedRandomList
(List<? extends WeightedEntry.Wrapper<E>> p_146262_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> SimpleWeightedRandomList.Builder<E>
builder()
static <E> SimpleWeightedRandomList<E>
empty()
getRandomValue
(RandomSource p_216821_) static <E> SimpleWeightedRandomList<E>
single
(E p_185863_) static <E> com.mojang.serialization.Codec<SimpleWeightedRandomList<E>>
wrappedCodec
(com.mojang.serialization.Codec<E> p_146265_) static <E> com.mojang.serialization.Codec<SimpleWeightedRandomList<E>>
wrappedCodecAllowingEmpty
(com.mojang.serialization.Codec<E> p_185861_)
-
Constructor Details
-
SimpleWeightedRandomList
SimpleWeightedRandomList(List<? extends WeightedEntry.Wrapper<E>> p_146262_)
-
-
Method Details
-
wrappedCodecAllowingEmpty
public static <E> com.mojang.serialization.Codec<SimpleWeightedRandomList<E>> wrappedCodecAllowingEmpty(com.mojang.serialization.Codec<E> p_185861_) -
wrappedCodec
public static <E> com.mojang.serialization.Codec<SimpleWeightedRandomList<E>> wrappedCodec(com.mojang.serialization.Codec<E> p_146265_) -
builder
-
empty
-
single
-
getRandomValue
-