Package net.minecraft.src
Class SoundManager
java.lang.Object
net.minecraft.src.SoundManager
- All Implemented Interfaces:
ResourceManagerReloadListener
-
Constructor Summary
ConstructorsConstructorDescriptionSoundManager(ResourceManager par1ResourceManager, GameSettings par2GameSettings, File par3File) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an audio file to the music SoundPool.voidAdds a sounds with the name from the file.voidaddStreaming(String par1Str) Adds an audio file to the streaming SoundPool.voidcleanup()Cleans up the Sound Systemvoidfunc_92070_a(String par1Str, float par2, float par3, float par4, float par5, float par6, int par7) voidgetMappedSound(String originalSound) getMappedStepSound(int blockID) booleanisEntitySoundPlaying(Entity par1Entity) Returns true if a sound is currently associated with the given entity, or false otherwise.voidonResourceManagerReload(ResourceManager par1ResourceManager) voidCalled when one of the sound level options has changed.voidPauses all currently playing soundsvoidplayEntitySound(String par1Str, Entity par2Entity, float par3, float par4, boolean par5) If a sound is already playing from the given entity, update the position and velocity of that sound to match the entity.voidIf its time to play new music it starts it up.voidPlays a sound.voidplaySoundFX(String par1Str, float par2, float par3) Plays a sound effect with the volume and pitch of the parameters passed.voidplayStreaming(String par1Str, float par2, float par3, float par4) voidResumes playing all currently playing sounds (after pauseAllSounds)voidsetEntitySoundPitch(Entity par1Entity, float par2) Sets the pitch of the sound associated with the given entity, if one is playing.voidsetEntitySoundVolume(Entity par1Entity, float par2) Sets the volume of the sound associated with the given entity, if one is playing.voidsetListener(EntityLivingBase par1EntityLivingBase, float par2) Sets the listener of soundsvoidStops all currently playing soundsvoidstopEntitySound(Entity par1Entity) Stops playing the sound associated with the given entityvoidupdateSoundLocation(Entity par1Entity) Updates the sound associated with the entity with that entity's position and velocity.voidupdateSoundLocation(Entity par1Entity, Entity par2Entity) Updates the sound associated with soundEntity with the position and velocity of trackEntity.
-
Constructor Details
-
SoundManager
public SoundManager(ResourceManager par1ResourceManager, GameSettings par2GameSettings, File par3File)
-
-
Method Details
-
onResourceManagerReload
- Specified by:
onResourceManagerReloadin interfaceResourceManagerReloadListener
-
onSoundOptionsChanged
public void onSoundOptionsChanged()Called when one of the sound level options has changed. -
cleanup
public void cleanup()Cleans up the Sound System -
addSound
Adds a sounds with the name from the file. Args: name, file -
addStreaming
Adds an audio file to the streaming SoundPool. -
addMusic
Adds an audio file to the music SoundPool. -
playRandomMusicIfReady
public void playRandomMusicIfReady()If its time to play new music it starts it up. -
setListener
Sets the listener of sounds -
stopAllSounds
public void stopAllSounds()Stops all currently playing sounds -
playStreaming
-
updateSoundLocation
Updates the sound associated with the entity with that entity's position and velocity. Args: the entity -
updateSoundLocation
Updates the sound associated with soundEntity with the position and velocity of trackEntity. Args: soundEntity, trackEntity -
isEntitySoundPlaying
Returns true if a sound is currently associated with the given entity, or false otherwise. -
stopEntitySound
Stops playing the sound associated with the given entity -
setEntitySoundVolume
Sets the volume of the sound associated with the given entity, if one is playing. The volume is scaled by the global sound volume. Args: the entity, the volume (from 0 to 1) -
setEntitySoundPitch
Sets the pitch of the sound associated with the given entity, if one is playing. Args: the entity, the pitch -
playEntitySound
public void playEntitySound(String par1Str, Entity par2Entity, float par3, float par4, boolean par5) If a sound is already playing from the given entity, update the position and velocity of that sound to match the entity. Otherwise, start playing a sound from that entity. Setting the last flag to true will prevent other sounds from overriding this one. Args: The sound name, the entity, the volume, the pitch, priority -
playSound
Plays a sound. Args: soundName, x, y, z, volume, pitch -
playSoundFX
Plays a sound effect with the volume and pitch of the parameters passed. The sound isn't affected by position of the player (full volume and center balanced) -
pauseAllSounds
public void pauseAllSounds()Pauses all currently playing sounds -
resumeAllSounds
public void resumeAllSounds()Resumes playing all currently playing sounds (after pauseAllSounds) -
func_92071_g
public void func_92071_g() -
func_92070_a
public void func_92070_a(String par1Str, float par2, float par3, float par4, float par5, float par6, int par7) -
getMappedSound
-
getMappedStepSound
-