Package net.minecraft.util
Class WeightedRandom
- java.lang.Object
-
- net.minecraft.util.WeightedRandom
-
public class WeightedRandom extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WeightedRandom.Item
-
Constructor Summary
Constructors Constructor Description WeightedRandom()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends WeightedRandom.Item>
TgetRandomItem(java.util.Random p_76271_0_, java.util.List<T> p_76271_1_)
static <T extends WeightedRandom.Item>
TgetRandomItem(java.util.Random p_76273_0_, java.util.List<T> p_76273_1_, int p_76273_2_)
static int
getTotalWeight(java.util.List<? extends WeightedRandom.Item> p_76272_0_)
static <T extends WeightedRandom.Item>
TgetWeightedItem(java.util.List<T> p_180166_0_, int p_180166_1_)
-
-
-
Method Detail
-
getTotalWeight
public static int getTotalWeight(java.util.List<? extends WeightedRandom.Item> p_76272_0_)
-
getRandomItem
public static <T extends WeightedRandom.Item> T getRandomItem(java.util.Random p_76273_0_, java.util.List<T> p_76273_1_, int p_76273_2_)
-
getWeightedItem
public static <T extends WeightedRandom.Item> T getWeightedItem(java.util.List<T> p_180166_0_, int p_180166_1_)
-
getRandomItem
public static <T extends WeightedRandom.Item> T getRandomItem(java.util.Random p_76271_0_, java.util.List<T> p_76271_1_)
-
-