Package net.minecraft.client.audio
Class SoundHandler
- java.lang.Object
-
- net.minecraft.client.resources.ReloadListener<SoundHandler.Loader>
-
- net.minecraft.client.audio.SoundHandler
-
- All Implemented Interfaces:
IFutureReloadListener
public class SoundHandler extends ReloadListener<SoundHandler.Loader>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoundHandler.Loader
-
Nested classes/interfaces inherited from interface net.minecraft.resources.IFutureReloadListener
IFutureReloadListener.IStage
-
-
Field Summary
Fields Modifier and Type Field Description static Sound
EMPTY_SOUND
private static com.google.gson.Gson
GSON
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.Map<ResourceLocation,SoundEventAccessor>
registry
private static com.google.gson.reflect.TypeToken<java.util.Map<java.lang.String,SoundList>>
SOUND_EVENT_REGISTRATION_TYPE
private SoundEngine
soundEngine
-
Constructor Summary
Constructors Constructor Description SoundHandler(IResourceManager p_i45122_1_, GameSettings p_i45122_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ISoundEventListener p_184402_1_)
protected void
apply(SoundHandler.Loader p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)
void
destroy()
java.util.Collection<ResourceLocation>
getAvailableSounds()
java.lang.String
getDebugString()
IResourceType
getResourceType()
SoundEventAccessor
getSoundEvent(ResourceLocation p_184398_1_)
boolean
isActive(ISound p_215294_1_)
void
pause()
void
play(ISound p_147682_1_)
void
playDelayed(ISound p_147681_1_, int p_147681_2_)
protected SoundHandler.Loader
prepare(IResourceManager p_212854_1_, IProfiler p_212854_2_)
void
queueTickingSound(ITickableSound p_229364_1_)
void
removeListener(ISoundEventListener p_184400_1_)
void
resume()
void
stop()
void
stop(ISound p_147683_1_)
void
stop(ResourceLocation p_195478_1_, SoundCategory p_195478_2_)
void
tick(boolean p_215290_1_)
void
updateSource(ActiveRenderInfo p_215289_1_)
void
updateSourceVolume(SoundCategory p_184399_1_, float p_184399_2_)
private static boolean
validateSoundResource(Sound p_215292_0_, ResourceLocation p_215292_1_, IResourceManager p_215292_2_)
-
Methods inherited from class net.minecraft.client.resources.ReloadListener
reload
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.resources.IFutureReloadListener
getName
-
-
-
-
Field Detail
-
EMPTY_SOUND
public static final Sound EMPTY_SOUND
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
GSON
private static final com.google.gson.Gson GSON
-
SOUND_EVENT_REGISTRATION_TYPE
private static final com.google.gson.reflect.TypeToken<java.util.Map<java.lang.String,SoundList>> SOUND_EVENT_REGISTRATION_TYPE
-
registry
private final java.util.Map<ResourceLocation,SoundEventAccessor> registry
-
soundEngine
private final SoundEngine soundEngine
-
-
Constructor Detail
-
SoundHandler
public SoundHandler(IResourceManager p_i45122_1_, GameSettings p_i45122_2_)
-
-
Method Detail
-
prepare
protected SoundHandler.Loader prepare(IResourceManager p_212854_1_, IProfiler p_212854_2_)
- Specified by:
prepare
in classReloadListener<SoundHandler.Loader>
-
apply
protected void apply(SoundHandler.Loader p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)
- Specified by:
apply
in classReloadListener<SoundHandler.Loader>
-
validateSoundResource
private static boolean validateSoundResource(Sound p_215292_0_, ResourceLocation p_215292_1_, IResourceManager p_215292_2_)
-
getSoundEvent
@Nullable public SoundEventAccessor getSoundEvent(ResourceLocation p_184398_1_)
-
getAvailableSounds
public java.util.Collection<ResourceLocation> getAvailableSounds()
-
queueTickingSound
public void queueTickingSound(ITickableSound p_229364_1_)
-
play
public void play(ISound p_147682_1_)
-
playDelayed
public void playDelayed(ISound p_147681_1_, int p_147681_2_)
-
updateSource
public void updateSource(ActiveRenderInfo p_215289_1_)
-
pause
public void pause()
-
stop
public void stop()
-
destroy
public void destroy()
-
tick
public void tick(boolean p_215290_1_)
-
resume
public void resume()
-
updateSourceVolume
public void updateSourceVolume(SoundCategory p_184399_1_, float p_184399_2_)
-
stop
public void stop(ISound p_147683_1_)
-
isActive
public boolean isActive(ISound p_215294_1_)
-
addListener
public void addListener(ISoundEventListener p_184402_1_)
-
removeListener
public void removeListener(ISoundEventListener p_184400_1_)
-
stop
public void stop(@Nullable ResourceLocation p_195478_1_, @Nullable SoundCategory p_195478_2_)
-
getResourceType
public IResourceType getResourceType()
-
getDebugString
public java.lang.String getDebugString()
-
-