类 WeightedRandomList<E extends WeightedEntry>
java.lang.Object
net.minecraft.util.random.WeightedRandomList<E>
- 直接已知子类:
SimpleWeightedRandomList
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <E extends WeightedEntry>
com.mojang.serialization.Codec<WeightedRandomList<E>>codec
(com.mojang.serialization.Codec<E> pElementCodec) static <E extends WeightedEntry>
WeightedRandomList<E>create()
static <E extends WeightedEntry>
WeightedRandomList<E>create
(E... pItems) static <E extends WeightedEntry>
WeightedRandomList<E>getRandom
(RandomSource pRandom) boolean
isEmpty()
unwrap()
-
字段详细资料
-
totalWeight
private final int totalWeight -
items
-
-
构造器详细资料
-
WeightedRandomList
-
-
方法详细资料
-
create
-
create
-
create
-
isEmpty
public boolean isEmpty() -
getRandom
-
unwrap
-
codec
public static <E extends WeightedEntry> com.mojang.serialization.Codec<WeightedRandomList<E>> codec(com.mojang.serialization.Codec<E> pElementCodec)
-