@Environment(value=CLIENT) public class WeightedSoundSet extends Object implements SoundContainer<Sound>
Modifier and Type | Field and Description |
---|---|
private Identifier |
id |
private Random |
random |
private List<SoundContainer<Sound>> |
sounds |
private Text |
subtitle |
Constructor and Description |
---|
WeightedSoundSet(Identifier id,
String subtitle) |
Modifier and Type | Method and Description |
---|---|
void |
add(SoundContainer<Sound> soundContainer) |
Sound |
getSound() |
Text |
getSubtitle() |
int |
getWeight() |
void |
preload(SoundSystem soundSystem) |
private final List<SoundContainer<Sound>> sounds
private final Random random
private final Identifier id
public WeightedSoundSet(Identifier id, @Nullable String subtitle)
public int getWeight()
getWeight
in interface SoundContainer<Sound>
public Sound getSound()
getSound
in interface SoundContainer<Sound>
public void add(SoundContainer<Sound> soundContainer)
public void preload(SoundSystem soundSystem)
preload
in interface SoundContainer<Sound>