Package net.minecraft.util.random
Class WeightedRandom
java.lang.Object
net.minecraft.util.random.WeightedRandom
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T extends WeightedEntry>
 Optional<T>getRandomItem(RandomSource p_216823_, List<T> p_216824_) static <T extends WeightedEntry>
 Optional<T>getRandomItem(RandomSource p_216826_, List<T> p_216827_, int p_216828_) static intgetTotalWeight(List<? extends WeightedEntry> p_146313_) static <T extends WeightedEntry>
 Optional<T>getWeightedItem(List<T> p_146315_, int p_146316_) 
- 
Constructor Details- 
WeightedRandomprivate WeightedRandom()
 
- 
- 
Method Details- 
getTotalWeight
- 
getRandomItempublic static <T extends WeightedEntry> Optional<T> getRandomItem(RandomSource p_216826_, List<T> p_216827_, int p_216828_) 
- 
getWeightedItempublic static <T extends WeightedEntry> Optional<T> getWeightedItem(List<T> p_146315_, int p_146316_) 
- 
getRandomItempublic static <T extends WeightedEntry> Optional<T> getRandomItem(RandomSource p_216823_, List<T> p_216824_) 
 
-