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
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<E>private final int - 
Constructor Summary
Constructors - 
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>getRandom(RandomSource p_216830_) booleanisEmpty()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_)  
 -