public static class WeightedList.Entry<T> extends Object
Modifier and Type | Field and Description |
---|---|
private T |
item |
private double |
shuffledOrder |
private int |
weight |
Modifier | Constructor and Description |
---|---|
private |
Entry(T item,
int weight) |
Modifier and Type | Method and Description |
---|---|
static <E> com.mojang.serialization.Codec<WeightedList.Entry<E>> |
createCodec(com.mojang.serialization.Codec<E> codec) |
T |
getElement() |
private double |
getShuffledOrder() |
private void |
setShuffledOrder(float random) |
String |
toString() |
private final T item
private final int weight
private double shuffledOrder
private Entry(T item, int weight)
private double getShuffledOrder()
private void setShuffledOrder(float random)
public T getElement()
public static <E> com.mojang.serialization.Codec<WeightedList.Entry<E>> createCodec(com.mojang.serialization.Codec<E> codec)