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 classSoundHandler.Loader-
Nested classes/interfaces inherited from interface net.minecraft.resources.IFutureReloadListener
IFutureReloadListener.IStage
-
-
Field Summary
Fields Modifier and Type Field Description static SoundEMPTY_SOUNDprivate static com.google.gson.GsonGSONprivate static org.apache.logging.log4j.LoggerLOGGERprivate java.util.Map<ResourceLocation,SoundEventAccessor>registryprivate static com.google.gson.reflect.TypeToken<java.util.Map<java.lang.String,SoundList>>SOUND_EVENT_REGISTRATION_TYPEprivate SoundEnginesoundEngine
-
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 voidaddListener(ISoundEventListener p_184402_1_)protected voidapply(SoundHandler.Loader p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)voiddestroy()java.util.Collection<ResourceLocation>getAvailableSounds()java.lang.StringgetDebugString()IResourceTypegetResourceType()SoundEventAccessorgetSoundEvent(ResourceLocation p_184398_1_)booleanisActive(ISound p_215294_1_)voidpause()voidplay(ISound p_147682_1_)voidplayDelayed(ISound p_147681_1_, int p_147681_2_)protected SoundHandler.Loaderprepare(IResourceManager p_212854_1_, IProfiler p_212854_2_)voidqueueTickingSound(ITickableSound p_229364_1_)voidremoveListener(ISoundEventListener p_184400_1_)voidresume()voidstop()voidstop(ISound p_147683_1_)voidstop(ResourceLocation p_195478_1_, SoundCategory p_195478_2_)voidtick(boolean p_215290_1_)voidupdateSource(ActiveRenderInfo p_215289_1_)voidupdateSourceVolume(SoundCategory p_184399_1_, float p_184399_2_)private static booleanvalidateSoundResource(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:
preparein classReloadListener<SoundHandler.Loader>
-
apply
protected void apply(SoundHandler.Loader p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)
- Specified by:
applyin 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()
-
-