Class WeightedRandom


  • public class WeightedRandom
    extends java.lang.Object
    • Constructor Detail

      • WeightedRandom

        public WeightedRandom()
    • 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_)