@Environment(value=CLIENT) public class SoundManager extends SinglePreparationResourceReloadListener<SoundManager.SoundList>
Modifier and Type | Class and Description |
---|---|
static class |
SoundManager.SoundList |
ResourceReloadListener.Synchronizer
Modifier and Type | Field and Description |
---|---|
private static Gson |
GSON |
private static Logger |
LOGGER |
static Sound |
MISSING_SOUND |
private Map<Identifier,WeightedSoundSet> |
sounds |
private SoundSystem |
soundSystem |
private static TypeToken<Map<String,SoundEntry>> |
TYPE |
Constructor and Description |
---|
SoundManager(ResourceManager resourceManager,
GameOptions gameOptions) |
reload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public static final Sound MISSING_SOUND
private static final Logger LOGGER
private static final Gson GSON
private static final TypeToken<Map<String,SoundEntry>> TYPE
private final Map<Identifier,WeightedSoundSet> sounds
private final SoundSystem soundSystem
public SoundManager(ResourceManager resourceManager, GameOptions gameOptions)
protected SoundManager.SoundList prepare(ResourceManager resourceManager, Profiler profiler)
prepare
in class SinglePreparationResourceReloadListener<SoundManager.SoundList>
protected void apply(SoundManager.SoundList soundList, ResourceManager resourceManager, Profiler profiler)
apply
in class SinglePreparationResourceReloadListener<SoundManager.SoundList>
private static boolean isSoundResourcePresent(Sound sound, Identifier identifier, ResourceManager resourceManager)
@Nullable public WeightedSoundSet get(Identifier identifier)
public Collection<Identifier> getKeys()
public void playNextTick(TickableSoundInstance sound)
public void play(SoundInstance sound)
public void play(SoundInstance sound, int delay)
public void updateListenerPosition(Camera camera)
public void pauseAll()
public void stopAll()
public void close()
public void tick(boolean bool)
public void resumeAll()
public void updateSoundVolume(SoundCategory category, float volume)
public void stop(SoundInstance soundInstance)
public boolean isPlaying(SoundInstance soundInstance)
public void registerListener(SoundInstanceListener soundInstanceListener)
public void unregisterListener(SoundInstanceListener soundInstanceListener)
public void stopSounds(@Nullable Identifier identifier, @Nullable SoundCategory soundCategory)
public String getDebugString()