Class WeightedList<U>


  • public class WeightedList<U>
    extends java.lang.Object
    • Field Detail

      • random

        private final java.util.Random random
    • Constructor Detail

      • WeightedList

        public WeightedList()
    • Method Detail

      • codec

        public static <U> com.mojang.serialization.Codec<WeightedList<U>> codec​(com.mojang.serialization.Codec<U> p_234002_0_)
      • add

        public WeightedList<U> add​(U p_226313_1_,
                                   int p_226313_2_)
      • shuffle

        public WeightedList<U> shuffle​(java.util.Random p_226314_1_)
      • isEmpty

        public boolean isEmpty()
      • stream

        public java.util.stream.Stream<U> stream()
      • getOne

        public U getOne​(java.util.Random p_226318_1_)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object