net.minecraft.util.random

public final class WeightedList<E>

bsj
net.minecraft.util.random.WeightedList
net.minecraft.class_6012
net.minecraft.util.collection.Pool

Field summary

Modifier and TypeField
private static final int
a
FLAT_THRESHOLD
field_55646
FLATTENED_CONTENT_THRESHOLD
private final int
b
totalWeight
field_29934
totalWeight
private final List<Weighted<E>>
c
items
field_29935
entries
private final WeightedList$Selector<E>
d
selector
field_55647
content

Constructor summary

ModifierConstructor
(List<? extends Weighted<E>> entries)

Method summary

Modifier and TypeMethod
public static <E> WeightedList<E>
a()
of()
method_34990()
empty()
public static <E> WeightedList<E>
a(E arg0)
of(E arg0)
method_66214(E arg0)
of(E entry)
public static <E> WeightedList<E>
a(bsi<E>... arg0)
of(Weighted<E>... arg0)
method_34989(class_6010<E>... arg0)
of(Weighted<E>... entries)
public static <E> WeightedList<E>
a(List<bsi<E>> arg0)
of(List<Weighted<E>> arg0)
method_34988(List<class_6010<E>> arg0)
of(List<Weighted<E>> entries)
public static <E> WeightedList$Builder<E>
b()
builder()
method_66215()
builder()
public boolean
c()
isEmpty()
method_34993()
isEmpty()
public Optional<E>
a(azt arg0)
getRandom(RandomSource arg0)
method_34992(class_5819 arg0)
getOrEmpty(Random random)
public E
b(azt arg0)
getRandomOrThrow(RandomSource arg0)
method_66216(class_5819 arg0)
get(Random random)
public List<Weighted<E>>
d()
unwrap()
method_34994()
getEntries()
public static <E> com.mojang.serialization.Codec<WeightedList<E>>
a(com.mojang.serialization.Codec<E> arg0)
codec(com.mojang.serialization.Codec<E> arg0)
method_34991(com.mojang.serialization.Codec<E> arg0)
createCodec(com.mojang.serialization.Codec<E> entryCodec)
public static <E> com.mojang.serialization.Codec<WeightedList<E>>
a(com.mojang.serialization.MapCodec<E> arg0)
codec(com.mojang.serialization.MapCodec<E> arg0)
method_66213(com.mojang.serialization.MapCodec<E> arg0)
createCodec(com.mojang.serialization.MapCodec<E> entryCodec)
public static <E> com.mojang.serialization.Codec<WeightedList<E>>
b(com.mojang.serialization.Codec<E> arg0)
nonEmptyCodec(com.mojang.serialization.Codec<E> arg0)
method_66217(com.mojang.serialization.Codec<E> arg0)
createNonEmptyCodec(com.mojang.serialization.Codec<E> entryCodec)
public static <E> com.mojang.serialization.Codec<WeightedList<E>>
b(com.mojang.serialization.MapCodec<E> arg0)
nonEmptyCodec(com.mojang.serialization.MapCodec<E> arg0)
method_66218(com.mojang.serialization.MapCodec<E> arg0)
createNonEmptyCodec(com.mojang.serialization.MapCodec<E> entryCodec)
public boolean
b(E arg0)
contains(E arg0)
method_66647(E arg0)
contains(E value)