Class RandomWeightedList<T>
java.lang.Object
com.github.retrooper.packetevents.util.RandomWeightedList<T>
- All Implemented Interfaces:
Iterable<RandomWeightedList.Entry<T>>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRandomWeightedList(List<RandomWeightedList.Entry<T>> entries) RandomWeightedList(T entry, int weight) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RandomWeightedList<T> decode(NBT nbt, ClientVersion version, ComponentType.Decoder<T> decoder) static <T> NBTencode(RandomWeightedList<T> list, ClientVersion version, ComponentType.Encoder<T> encoder) @NotNull Iterator<RandomWeightedList.Entry<T>> iterator()voidsetEntries(List<RandomWeightedList.Entry<T>> entries) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RandomWeightedList
public RandomWeightedList() -
RandomWeightedList
-
RandomWeightedList
-
RandomWeightedList
-
-
Method Details
-
decode
public static <T> RandomWeightedList<T> decode(NBT nbt, ClientVersion version, ComponentType.Decoder<T> decoder) -
encode
public static <T> NBT encode(RandomWeightedList<T> list, ClientVersion version, ComponentType.Encoder<T> encoder) -
getEntries
-
setEntries
-
iterator
-