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 class
Sound.Type
-
Field Summary
Fields Modifier and Type Field Description private int
attenuationDistance
private ResourceLocation
location
private float
pitch
private boolean
preload
private boolean
stream
private Sound.Type
type
private float
volume
private int
weight
-
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 int
getAttenuationDistance()
ResourceLocation
getLocation()
ResourceLocation
getPath()
float
getPitch()
Sound
getSound()
Sound.Type
getType()
float
getVolume()
int
getWeight()
void
preloadIfRequired(SoundEngine p_217867_1_)
boolean
shouldPreload()
boolean
shouldStream()
java.lang.String
toString()
-
-
-
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:
getWeight
in interfaceISoundEventAccessor<Sound>
-
getSound
public Sound getSound()
- Specified by:
getSound
in interfaceISoundEventAccessor<Sound>
-
preloadIfRequired
public void preloadIfRequired(SoundEngine p_217867_1_)
- Specified by:
preloadIfRequired
in 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:
toString
in classjava.lang.Object
-
-