net.minecraft.util.random

public class WeightedRandom

bsk
net.minecraft.util.random.WeightedRandom
net.minecraft.class_6011
net.minecraft.util.collection.Weighting

Constructor summary

ModifierConstructor
private ()

Method summary

Modifier and TypeMethod
public static <T> int
a(List<T> arg0, ToIntFunction<T> arg1)
getTotalWeight(List<T> arg0, ToIntFunction<T> arg1)
method_34984(List<T> arg0, ToIntFunction<T> arg1)
getWeightSum(List<T> pool, ToIntFunction<T> weightGetter)
public static <T> Optional<T>
a(azt arg0, List<T> arg1, int arg2, ToIntFunction<T> arg3)
getRandomItem(RandomSource arg0, List<T> arg1, int arg2, ToIntFunction<T> arg3)
method_34987(class_5819 arg0, List<T> arg1, int arg2, ToIntFunction<T> arg3)
getRandom(Random random, List<T> pool, int totalWeight, ToIntFunction<T> weightGetter)
public static <T> Optional<T>
a(List<T> arg0, int arg1, ToIntFunction<T> arg2)
getWeightedItem(List<T> arg0, int arg1, ToIntFunction<T> arg2)
method_34985(List<T> arg0, int arg1, ToIntFunction<T> arg2)
getAt(List<T> pool, int totalWeight, ToIntFunction<T> weightGetter)
public static <T> Optional<T>
a(azt arg0, List<T> arg1, ToIntFunction<T> arg2)
getRandomItem(RandomSource arg0, List<T> arg1, ToIntFunction<T> arg2)
method_34986(class_5819 arg0, List<T> arg1, ToIntFunction<T> arg2)
getRandom(Random random, List<T> pool, ToIntFunction<T> weightGetter)