Package net.minecraft.util.collection
Class WeightedList<U>
java.lang.Object
net.minecraft.util.collection.WeightedList<U>
public class WeightedList<U> extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWeightedList.Entry<T> -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description WeightedList()privateWeightedList(List<WeightedList.Entry<U>> list) -
Method Summary
Modifier and Type Method Description WeightedList<U>add(U item, int weight)static <U> com.mojang.serialization.Codec<WeightedList<U>>method_28338(com.mojang.serialization.Codec<U> codec)booleanmethod_28339()UpickRandom(Random random)WeightedList<U>shuffle()WeightedList<U>shuffle(Random random)Stream<U>stream()StringtoString()
-
Field Details
-
Constructor Details
-
WeightedList
public WeightedList() -
WeightedList
-
-
Method Details
-
method_28338
public static <U> com.mojang.serialization.Codec<WeightedList<U>> method_28338(com.mojang.serialization.Codec<U> codec) -
add
-
shuffle
-
shuffle
-
method_28339
public boolean method_28339() -
stream
-
pickRandom
-
toString
-