public class SoundHandler extends java.lang.Object implements ITickable, IResourceManagerReloadListener
Modifier and Type | Field and Description |
---|---|
static Sound |
MISSING_SOUND |
Constructor and Description |
---|
SoundHandler(IResourceManager manager,
GameSettings gameSettingsIn) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ISoundEventListener listener) |
SoundEventAccessor |
getAccessor(ResourceLocation location) |
java.util.Collection<ResourceLocation> |
getAvailableSounds() |
IResourceType |
getResourceType() |
protected java.util.Map<java.lang.String,SoundList> |
getSoundMap(java.io.InputStream stream) |
boolean |
isPlaying(ISound sound) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
void |
pause() |
void |
play(ISound sound) |
void |
playDelayed(ISound sound,
int delay) |
void |
removeListener(ISoundEventListener listener) |
void |
resume() |
void |
setListener(Entity entity,
float partialTicks) |
void |
setListener(EntityPlayer player,
float partialTicks) |
void |
setSoundLevel(SoundCategory category,
float volume) |
void |
stop() |
void |
stop(ISound soundIn) |
void |
stop(ResourceLocation id,
SoundCategory category) |
void |
tick() |
void |
unloadSounds() |
public static final Sound MISSING_SOUND
public SoundHandler(IResourceManager manager, GameSettings gameSettingsIn)
public void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload
in interface IResourceManagerReloadListener
@Nullable protected java.util.Map<java.lang.String,SoundList> getSoundMap(java.io.InputStream stream)
@Nullable public SoundEventAccessor getAccessor(ResourceLocation location)
public java.util.Collection<ResourceLocation> getAvailableSounds()
public void play(ISound sound)
public void playDelayed(ISound sound, int delay)
public void setListener(EntityPlayer player, float partialTicks)
public void setListener(Entity entity, float partialTicks)
public void pause()
public void stop()
public void unloadSounds()
public void resume()
public void setSoundLevel(SoundCategory category, float volume)
public void stop(ISound soundIn)
public boolean isPlaying(ISound sound)
public void addListener(ISoundEventListener listener)
public void removeListener(ISoundEventListener listener)
public void stop(@Nullable ResourceLocation id, @Nullable SoundCategory category)
public IResourceType getResourceType()
getResourceType
in interface IResourceManagerReloadListener