Package net.minecraft.client.sounds
Class SoundManager
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<SoundManager.Preparations>
net.minecraft.client.sounds.SoundManager
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Sound
static final ResourceLocation
private static final com.google.gson.Gson
static final Sound
static final WeighedSoundEvents
static final ResourceLocation
(package private) static final org.slf4j.Logger
private final Map
<ResourceLocation, WeighedSoundEvents> private static final com.google.gson.reflect.TypeToken
<Map<String, SoundEventRegistration>> private final Map
<ResourceLocation, Resource> private final SoundEngine
private static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(SoundEventListener p_120375_) protected void
apply
(SoundManager.Preparations p_120377_, ResourceManager p_120378_, ProfilerFiller p_120379_) void
destroy()
void
getSoundEvent
(ResourceLocation p_120385_) boolean
isActive
(SoundInstance p_120404_) void
pause()
void
play
(SoundInstance p_120368_) void
playDelayed
(SoundInstance p_120370_, int p_120371_) protected SoundManager.Preparations
prepare
(ResourceManager p_120356_, ProfilerFiller p_120357_) void
queueTickingSound
(TickableSoundInstance p_120373_) void
reload()
void
removeListener
(SoundEventListener p_120402_) void
resume()
void
stop()
void
stop
(SoundInstance p_120400_) void
stop
(ResourceLocation p_120387_, SoundSource p_120388_) void
tick
(boolean p_120390_) void
updateSource
(Camera p_120362_) void
updateSourceVolume
(SoundSource p_120359_, float p_120360_) (package private) static boolean
validateSoundResource
(Sound p_250396_, ResourceLocation p_250879_, ResourceProvider p_248737_) Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
EMPTY_SOUND_LOCATION
-
EMPTY_SOUND
-
INTENTIONALLY_EMPTY_SOUND_LOCATION
-
INTENTIONALLY_EMPTY_SOUND_EVENT
-
INTENTIONALLY_EMPTY_SOUND
-
LOGGER
static final org.slf4j.Logger LOGGER -
SOUNDS_PATH
- See Also:
-
GSON
private static final com.google.gson.Gson GSON -
SOUND_EVENT_REGISTRATION_TYPE
private static final com.google.gson.reflect.TypeToken<Map<String,SoundEventRegistration>> SOUND_EVENT_REGISTRATION_TYPE -
registry
-
soundEngine
-
soundCache
-
-
Constructor Details
-
SoundManager
-
-
Method Details
-
prepare
- Specified by:
prepare
in classSimplePreparableReloadListener<SoundManager.Preparations>
-
apply
protected void apply(SoundManager.Preparations p_120377_, ResourceManager p_120378_, ProfilerFiller p_120379_) - Specified by:
apply
in classSimplePreparableReloadListener<SoundManager.Preparations>
-
getAvailableSoundDevices
-
getListenerTransform
-
validateSoundResource
static boolean validateSoundResource(Sound p_250396_, ResourceLocation p_250879_, ResourceProvider p_248737_) -
getSoundEvent
-
getAvailableSounds
-
queueTickingSound
-
play
-
playDelayed
-
updateSource
-
pause
public void pause() -
stop
public void stop() -
destroy
public void destroy() -
emergencyShutdown
public void emergencyShutdown() -
tick
public void tick(boolean p_120390_) -
resume
public void resume() -
updateSourceVolume
-
stop
-
isActive
-
addListener
-
removeListener
-
stop
-
getDebugString
-
reload
public void reload()
-