net.minecraft.util.random

public class WeightedRandomList<E extends WeightedEntry>

bcm
net.minecraft.util.random.WeightedRandomList
net.minecraft.class_6012
net.minecraft.util.collection.Pool
net.minecraft.src.C_141041_
net.minecraft.util.random.WeightedRandomList

Field summary

Modifier and TypeField
private final int
a
totalWeight
field_29934
totalWeight
f_146324_
private final com.google.common.collect.ImmutableList<E>
b
items
field_29935
entries
f_146325_

Constructor summary

ModifierConstructor
(List<? extends E> entries)

Method summary

Modifier and TypeMethod
public static <E extends WeightedEntry> WeightedRandomList<E>
c()
create()
method_34990()
empty()
m_146332_()
public static <E extends WeightedEntry> WeightedRandomList<E>
a(E... arg0)
create(E... arg0)
method_34989(E... arg0)
of(E... entries)
m_146330_(E... p_146331_)
public static <E extends WeightedEntry> WeightedRandomList<E>
a(List<E> arg0)
create(List<E> arg0)
method_34988(List<E> arg0)
of(List<E> entries)
m_146328_(List<E> p_146329_)
public boolean
d()
isEmpty()
method_34993()
isEmpty()
m_146337_()
public Optional<E>
b(apo arg0)
getRandom(RandomSource arg0)
method_34992(class_5819 arg0)
getOrEmpty(Random random)
m_216829_(C_212974_ arg0)
public List<E>
e()
unwrap()
method_34994()
getEntries()
m_146338_()
public static <E extends WeightedEntry> com.mojang.serialization.Codec<WeightedRandomList<E>>
c(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)
m_146333_(com.mojang.serialization.Codec<E> p_146334_)