Package net.minecraft.client.audio
Class SoundHandler
- java.lang.Object
-
- net.minecraft.client.audio.SoundHandler
-
- All Implemented Interfaces:
IResourceManagerReloadListener,ITickable
public class SoundHandler extends java.lang.Object implements IResourceManagerReloadListener, ITickable
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSoundHandler.SoundMap
-
Field Summary
Fields Modifier and Type Field Description static SoundPoolEntrymissing_sound
-
Constructor Summary
Constructors Constructor Description SoundHandler(IResourceManager manager, GameSettings gameSettingsIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoundEventAccessorCompositegetRandomSoundFromCategories(SoundCategory... categories)+ Returns a random sound from one or more categoriesSoundEventAccessorCompositegetSound(ResourceLocation location)protected java.util.Map<java.lang.String,SoundList>getSoundMap(java.io.InputStream stream)booleanisSoundPlaying(ISound sound)voidonResourceManagerReload(IResourceManager iresourcemanager)voidpauseSounds()voidplayDelayedSound(ISound sound, int delay)+ Plays the sound in n ticksvoidplaySound(ISound sound)+ Play a soundvoidresumeSounds()voidsetListener(EntityPlayer player, float parFloat1)voidsetSoundLevel(SoundCategory category, float volume)voidstopSound(ISound parISound)voidstopSounds()voidunloadSounds()voidupdate()+ Like the old updateEntity(), except more generic.
-
-
-
Field Detail
-
missing_sound
public static final SoundPoolEntry missing_sound
-
-
Constructor Detail
-
SoundHandler
public SoundHandler(IResourceManager manager, GameSettings gameSettingsIn)
-
-
Method Detail
-
onResourceManagerReload
public void onResourceManagerReload(IResourceManager iresourcemanager)
- Specified by:
onResourceManagerReloadin interfaceIResourceManagerReloadListener
-
getSoundMap
protected java.util.Map<java.lang.String,SoundList> getSoundMap(java.io.InputStream stream)
-
getSound
public SoundEventAccessorComposite getSound(ResourceLocation location)
-
playSound
public void playSound(ISound sound)
+ Play a sound
-
playDelayedSound
public void playDelayedSound(ISound sound, int delay)
+ Plays the sound in n ticks
-
setListener
public void setListener(EntityPlayer player, float parFloat1)
-
pauseSounds
public void pauseSounds()
-
stopSounds
public void stopSounds()
-
unloadSounds
public void unloadSounds()
-
update
public void update()
+ Like the old updateEntity(), except more generic.
-
resumeSounds
public void resumeSounds()
-
setSoundLevel
public void setSoundLevel(SoundCategory category, float volume)
-
stopSound
public void stopSound(ISound parISound)
-
getRandomSoundFromCategories
public SoundEventAccessorComposite getRandomSoundFromCategories(SoundCategory... categories)
+ Returns a random sound from one or more categories
-
isSoundPlaying
public boolean isSoundPlaying(ISound sound)
-
-