Package net.minecraft.client.sound
Class Sound
java.lang.Object
net.minecraft.client.sound.Sound
- All Implemented Interfaces:
SoundContainer<Sound>
@Environment(CLIENT) public class Sound extends Object implements SoundContainer<Sound>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSound.RegistrationType -
Field Summary
Fields Modifier and Type Field Description private intattenuationprivate Identifieridprivate floatpitchprivate booleanpreloadprivate Sound.RegistrationTyperegistrationTypeprivate booleanstreamprivate floatvolumeprivate intweight -
Constructor Summary
Constructors Constructor Description Sound(String id, float volume, float pitch, int weight, Sound.RegistrationType registrationType, boolean stream, boolean preload, int attenuation) -
Method Summary
Modifier and Type Method Description intgetAttenuation()IdentifiergetIdentifier()IdentifiergetLocation()floatgetPitch()Sound.RegistrationTypegetRegistrationType()SoundgetSound()floatgetVolume()intgetWeight()booleanisPreloaded()booleanisStreamed()voidpreload(SoundSystem soundSystem)StringtoString()
-
Field Details
-
id
-
volume
private final float volume -
pitch
private final float pitch -
weight
private final int weight -
registrationType
-
stream
private final boolean stream -
preload
private final boolean preload -
attenuation
private final int attenuation
-
-
Constructor Details
-
Sound
public Sound(String id, float volume, float pitch, int weight, Sound.RegistrationType registrationType, boolean stream, boolean preload, int attenuation)
-
-
Method Details
-
getIdentifier
-
getLocation
-
getVolume
public float getVolume() -
getPitch
public float getPitch() -
getWeight
public int getWeight()- Specified by:
getWeightin interfaceSoundContainer<Sound>
-
getSound
- Specified by:
getSoundin interfaceSoundContainer<Sound>
-
preload
- Specified by:
preloadin interfaceSoundContainer<Sound>
-
getRegistrationType
-
isStreamed
public boolean isStreamed() -
isPreloaded
public boolean isPreloaded() -
getAttenuation
public int getAttenuation() -
toString
-