Class Sound
java.lang.Object
net.minecraft.client.resources.sounds.Sound
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Identifierprivate final SampledFloatprivate final booleanstatic final FileToIdConverterprivate final booleanprivate final Sound.Typeprivate final SampledFloatprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionSound(Identifier location, SampledFloat volume, SampledFloat pitch, int weight, Sound.Type type, boolean stream, boolean preload, int attenuationDistance) -
Method Summary
Modifier and TypeMethodDescriptionintgetPath()getPitch()getSound(RandomSource random) getType()intvoidpreloadIfRequired(SoundEngine soundEngine) booleanbooleantoString()
-
Field Details
-
SOUND_LISTER
-
location
-
volume
-
pitch
-
weight
private final int weight -
type
-
stream
private final boolean stream -
preload
private final boolean preload -
attenuationDistance
private final int attenuationDistance
-
-
Constructor Details
-
Sound
public Sound(Identifier location, SampledFloat volume, SampledFloat pitch, int weight, Sound.Type type, boolean stream, boolean preload, int attenuationDistance)
-
-
Method Details
-
getLocation
-
getPath
-
getVolume
-
getPitch
-
getWeight
-
getSound
-
preloadIfRequired
- Specified by:
preloadIfRequiredin interfaceWeighted<Sound>
-
getType
-
shouldStream
public boolean shouldStream() -
shouldPreload
public boolean shouldPreload() -
getAttenuationDistance
public int getAttenuationDistance() -
toString
-