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 class
Sound.RegistrationType
-
Field Summary
Fields Modifier and Type Field Description private int
attenuation
private Identifier
id
private float
pitch
private boolean
preload
private Sound.RegistrationType
registrationType
private boolean
stream
private float
volume
private int
weight
-
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 int
getAttenuation()
Identifier
getIdentifier()
Identifier
getLocation()
float
getPitch()
Sound.RegistrationType
getRegistrationType()
Sound
getSound()
float
getVolume()
int
getWeight()
boolean
isPreloaded()
boolean
isStreamed()
void
preload(SoundSystem soundSystem)
String
toString()
-
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:
getWeight
in interfaceSoundContainer<Sound>
-
getSound
- Specified by:
getSound
in interfaceSoundContainer<Sound>
-
preload
- Specified by:
preload
in interfaceSoundContainer<Sound>
-
getRegistrationType
-
isStreamed
public boolean isStreamed() -
isPreloaded
public boolean isPreloaded() -
getAttenuation
public int getAttenuation() -
toString
-