public class Sound extends java.lang.Object implements ISoundEventAccessor<Sound>
Modifier and Type | Class and Description |
---|---|
static class |
Sound.Type |
Modifier and Type | Field and Description |
---|---|
private int |
attenuationDistance |
private ResourceLocation |
name |
private float |
pitch |
private boolean |
preload |
private boolean |
streaming |
private Sound.Type |
type |
private float |
volume |
private int |
weight |
Constructor and Description |
---|
Sound(java.lang.String nameIn,
float volumeIn,
float pitchIn,
int weightIn,
Sound.Type typeIn,
boolean streamingIn,
boolean preloadIn,
int attenuationDistanceIn) |
Modifier and Type | Method and Description |
---|---|
Sound |
cloneEntry() |
void |
enqueuePreload(SoundEngine engine) |
int |
getAttenuationDistance() |
float |
getPitch() |
ResourceLocation |
getSoundAsOggLocation() |
ResourceLocation |
getSoundLocation() |
Sound.Type |
getType() |
float |
getVolume() |
int |
getWeight() |
boolean |
isStreaming() |
boolean |
shouldPreload() |
private final ResourceLocation name
private final float volume
private final float pitch
private final int weight
private final Sound.Type type
private final boolean streaming
private final boolean preload
private final int attenuationDistance
public Sound(java.lang.String nameIn, float volumeIn, float pitchIn, int weightIn, Sound.Type typeIn, boolean streamingIn, boolean preloadIn, int attenuationDistanceIn)
public ResourceLocation getSoundLocation()
public ResourceLocation getSoundAsOggLocation()
public float getVolume()
public float getPitch()
public int getWeight()
getWeight
in interface ISoundEventAccessor<Sound>
public Sound cloneEntry()
cloneEntry
in interface ISoundEventAccessor<Sound>
public void enqueuePreload(SoundEngine engine)
enqueuePreload
in interface ISoundEventAccessor<Sound>
public Sound.Type getType()
public boolean isStreaming()
public boolean shouldPreload()
public int getAttenuationDistance()