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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSimpleWeightedRandomList
(List<? extends WeightedEntry.Wrapper<E>> p_146262_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> SimpleWeightedRandomList.Builder
<E> builder()
static <E> SimpleWeightedRandomList
<E> empty()
getRandomValue
(RandomSource pRandom) static <E> SimpleWeightedRandomList
<E> single
(E pData) static <E> com.mojang.serialization.Codec
<SimpleWeightedRandomList<E>> wrappedCodec
(com.mojang.serialization.Codec<E> pElementCodec) static <E> com.mojang.serialization.Codec
<SimpleWeightedRandomList<E>> wrappedCodecAllowingEmpty
(com.mojang.serialization.Codec<E> pCodec)
-
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> pCodec) -
wrappedCodec
public static <E> com.mojang.serialization.Codec<SimpleWeightedRandomList<E>> wrappedCodec(com.mojang.serialization.Codec<E> pElementCodec) -
builder
-
empty
-
single
-
getRandomValue
-