public class SoundHandler extends java.lang.Object implements IResourceManagerReloadListener, ITickable
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
GSON |
private static org.apache.logging.log4j.Logger |
LOGGER |
private IResourceManager |
mcResourceManager |
static Sound |
MISSING_SOUND |
private SoundManager |
sndManager |
private SoundRegistry |
soundRegistry |
private static java.lang.reflect.ParameterizedType |
TYPE |
Constructor and Description |
---|
SoundHandler(IResourceManager manager,
GameSettings gameSettingsIn) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ISoundEventListener listener) |
SoundEventAccessor |
getAccessor(ResourceLocation location) |
protected java.util.Map<java.lang.String,SoundList> |
getSoundMap(java.io.InputStream stream) |
boolean |
isSoundPlaying(ISound sound) |
private void |
loadSoundResource(ResourceLocation location,
SoundList sounds) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
void |
pauseSounds() |
void |
playDelayedSound(ISound sound,
int delay) |
void |
playSound(ISound sound) |
void |
removeListener(ISoundEventListener listener) |
void |
resumeSounds() |
void |
setListener(Entity entity,
float partialTicks) |
void |
setListener(EntityPlayer player,
float p_147691_2_) |
void |
setSoundLevel(SoundCategory category,
float volume) |
void |
stop(java.lang.String p_189520_1_,
SoundCategory p_189520_2_) |
void |
stopSound(ISound soundIn) |
void |
stopSounds() |
void |
unloadSounds() |
void |
update() |
private boolean |
validateSoundResource(Sound p_184401_1_,
ResourceLocation p_184401_2_) |
public static final Sound MISSING_SOUND
private static final org.apache.logging.log4j.Logger LOGGER
private static final com.google.gson.Gson GSON
private static final java.lang.reflect.ParameterizedType TYPE
private final SoundRegistry soundRegistry
private final SoundManager sndManager
private final IResourceManager mcResourceManager
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)
private void loadSoundResource(ResourceLocation location, SoundList sounds)
private boolean validateSoundResource(Sound p_184401_1_, ResourceLocation p_184401_2_)
@Nullable public SoundEventAccessor getAccessor(ResourceLocation location)
public void playSound(ISound sound)
public void playDelayedSound(ISound sound, int delay)
public void setListener(EntityPlayer player, float p_147691_2_)
public void setListener(Entity entity, float partialTicks)
public void pauseSounds()
public void stopSounds()
public void unloadSounds()
public void resumeSounds()
public void setSoundLevel(SoundCategory category, float volume)
public void stopSound(ISound soundIn)
public boolean isSoundPlaying(ISound sound)
public void addListener(ISoundEventListener listener)
public void removeListener(ISoundEventListener listener)
public void stop(java.lang.String p_189520_1_, SoundCategory p_189520_2_)