public class SoundHandler extends ReloadListener<SoundHandler.Loader>
Modifier and Type | Class and Description |
---|---|
static class |
SoundHandler.Loader |
IFutureReloadListener.IStage
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
GSON |
private static org.apache.logging.log4j.Logger |
LOGGER |
static Sound |
MISSING_SOUND |
private SoundEngine |
sndManager |
private java.util.Map<ResourceLocation,SoundEventAccessor> |
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) |
protected void |
apply(SoundHandler.Loader objectIn,
IResourceManager resourceManagerIn,
IProfiler profilerIn) |
private static boolean |
func_215292_b(Sound p_215292_0_,
ResourceLocation p_215292_1_,
IResourceManager p_215292_2_) |
void |
func_229364_a_(ITickableSound p_229364_1_) |
SoundEventAccessor |
getAccessor(ResourceLocation location) |
java.util.Collection<ResourceLocation> |
getAvailableSounds() |
java.lang.String |
getDebugString() |
IResourceType |
getResourceType() |
protected static java.util.Map<java.lang.String,SoundList> |
getSoundMap(java.io.InputStream p_175085_0_) |
boolean |
isPlaying(ISound p_215294_1_) |
void |
pause() |
void |
play(ISound sound) |
void |
playDelayed(ISound sound,
int delay) |
protected SoundHandler.Loader |
prepare(IResourceManager resourceManagerIn,
IProfiler profilerIn) |
void |
removeListener(ISoundEventListener listener) |
void |
resume() |
void |
setSoundLevel(SoundCategory category,
float volume) |
void |
stop() |
void |
stop(ISound soundIn) |
void |
stop(ResourceLocation id,
SoundCategory category) |
void |
tick(boolean isGamePaused) |
void |
unloadSounds() |
void |
updateListener(ActiveRenderInfo p_215289_1_) |
reload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
func_225594_i_
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 java.util.Map<ResourceLocation,SoundEventAccessor> soundRegistry
private final SoundEngine sndManager
public SoundHandler(IResourceManager manager, GameSettings gameSettingsIn)
protected SoundHandler.Loader prepare(IResourceManager resourceManagerIn, IProfiler profilerIn)
prepare
in class ReloadListener<SoundHandler.Loader>
protected void apply(SoundHandler.Loader objectIn, IResourceManager resourceManagerIn, IProfiler profilerIn)
apply
in class ReloadListener<SoundHandler.Loader>
@Nullable protected static java.util.Map<java.lang.String,SoundList> getSoundMap(java.io.InputStream p_175085_0_)
private static boolean func_215292_b(Sound p_215292_0_, ResourceLocation p_215292_1_, IResourceManager p_215292_2_)
@Nullable public SoundEventAccessor getAccessor(ResourceLocation location)
public java.util.Collection<ResourceLocation> getAvailableSounds()
public void func_229364_a_(ITickableSound p_229364_1_)
public void play(ISound sound)
public void playDelayed(ISound sound, int delay)
public void updateListener(ActiveRenderInfo p_215289_1_)
public void pause()
public void stop()
public void unloadSounds()
public void tick(boolean isGamePaused)
public void resume()
public void setSoundLevel(SoundCategory category, float volume)
public void stop(ISound soundIn)
public boolean isPlaying(ISound p_215294_1_)
public void addListener(ISoundEventListener listener)
public void removeListener(ISoundEventListener listener)
public void stop(@Nullable ResourceLocation id, @Nullable SoundCategory category)
public IResourceType getResourceType()
public java.lang.String getDebugString()