Package net.minecraft.client.audio
Class Sound
- java.lang.Object
-
- net.minecraft.client.audio.Sound
-
- All Implemented Interfaces:
ISoundEventAccessor<Sound>
public class Sound extends java.lang.Object implements ISoundEventAccessor<Sound>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSound.Type
-
Field Summary
Fields Modifier and Type Field Description private intattenuationDistanceprivate ResourceLocationlocationprivate floatpitchprivate booleanpreloadprivate booleanstreamprivate Sound.Typetypeprivate floatvolumeprivate intweight
-
Constructor Summary
Constructors Constructor Description Sound(java.lang.String p_i49182_1_, float p_i49182_2_, float p_i49182_3_, int p_i49182_4_, Sound.Type p_i49182_5_, boolean p_i49182_6_, boolean p_i49182_7_, int p_i49182_8_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAttenuationDistance()ResourceLocationgetLocation()ResourceLocationgetPath()floatgetPitch()SoundgetSound()Sound.TypegetType()floatgetVolume()intgetWeight()voidpreloadIfRequired(SoundEngine p_217867_1_)booleanshouldPreload()booleanshouldStream()java.lang.StringtoString()
-
-
-
Field Detail
-
location
private final ResourceLocation location
-
volume
private final float volume
-
pitch
private final float pitch
-
weight
private final int weight
-
type
private final Sound.Type type
-
stream
private final boolean stream
-
preload
private final boolean preload
-
attenuationDistance
private final int attenuationDistance
-
-
Constructor Detail
-
Sound
public Sound(java.lang.String p_i49182_1_, float p_i49182_2_, float p_i49182_3_, int p_i49182_4_, Sound.Type p_i49182_5_, boolean p_i49182_6_, boolean p_i49182_7_, int p_i49182_8_)
-
-
Method Detail
-
getLocation
public ResourceLocation getLocation()
-
getPath
public ResourceLocation getPath()
-
getVolume
public float getVolume()
-
getPitch
public float getPitch()
-
getWeight
public int getWeight()
- Specified by:
getWeightin interfaceISoundEventAccessor<Sound>
-
getSound
public Sound getSound()
- Specified by:
getSoundin interfaceISoundEventAccessor<Sound>
-
preloadIfRequired
public void preloadIfRequired(SoundEngine p_217867_1_)
- Specified by:
preloadIfRequiredin interfaceISoundEventAccessor<Sound>
-
getType
public Sound.Type getType()
-
shouldStream
public boolean shouldStream()
-
shouldPreload
public boolean shouldPreload()
-
getAttenuationDistance
public int getAttenuationDistance()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-