Package net.minecraft.util.random
Class WeightedRandomList<E extends WeightedEntry>
java.lang.Object
net.minecraft.util.random.WeightedRandomList<E>
- Direct Known Subclasses:
SimpleWeightedRandomList
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends WeightedEntry>
com.mojang.serialization.Codec<WeightedRandomList<E>>codec(com.mojang.serialization.Codec<E> p_146334_)
static <E extends WeightedEntry>
WeightedRandomList<E>create()
static <E extends WeightedEntry>
WeightedRandomList<E>create(E... p_146331_)
static <E extends WeightedEntry>
WeightedRandomList<E>boolean
isEmpty()
unwrap()
-
Field Details
-
totalWeight
private final int totalWeight -
items
-
-
Constructor Details
-
WeightedRandomList
-
-
Method Details
-
create
-
create
-
create
-
isEmpty
public boolean isEmpty() -
getRandom
-
unwrap
-
codec
public static <E extends WeightedEntry> com.mojang.serialization.Codec<WeightedRandomList<E>> codec(com.mojang.serialization.Codec<E> p_146334_)
-