Package de.mrjulsen.dragnsounds.core.ext
Class CustomSoundInstance
java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
de.mrjulsen.dragnsounds.core.ext.CustomSoundInstance
- All Implemented Interfaces:
net.minecraft.client.resources.sounds.SoundInstance
public class CustomSoundInstance
extends net.minecraft.client.resources.sounds.AbstractSoundInstance
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.sounds.SoundInstance
net.minecraft.client.resources.sounds.SoundInstance.Attenuation
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
static final float
static final float
static final float
static final String
static final float
static final float
static final float
Fields inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
attenuation, delay, location, looping, pitch, relative, sound, source, volume, x, y, z
-
Constructor Summary
ConstructorDescriptionCustomSoundInstance
(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, boolean looping, int delay, net.minecraft.client.resources.sounds.SoundInstance.Attenuation attenuation, double x, double y, double z, boolean relative, int attenuationDistance) -
Method Summary
Modifier and TypeMethodDescriptionint
float
getPitch()
float
net.minecraft.client.sounds.WeighedSoundEvents
resolve
(net.minecraft.client.sounds.SoundManager manager) static CustomSoundInstance
ui
(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume) static CustomSoundInstance
world
(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume, net.minecraft.world.phys.Vec3 position, boolean relative, int attenuationDistance) Methods inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
getAttenuation, getDelay, getLocation, getSound, getSource, getX, getY, getZ, isLooping, isRelative, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.client.resources.sounds.SoundInstance
canPlaySound, canStartSilent
-
Field Details
-
CUSTOM_SOUND_FILENAME_ROOT
- See Also:
-
SOUND_LOCATION_ROOT
- See Also:
-
Sound
- Constant Field Values
-
PITCH_MIN
public static final float PITCH_MIN- See Also:
-
PITCH_MAX
public static final float PITCH_MAX- See Also:
-
PITCH_DEFAULT
public static final float PITCH_DEFAULT- See Also:
-
VOLUME_MIN
public static final float VOLUME_MIN- See Also:
-
VOLUME_MAX
public static final float VOLUME_MAX- See Also:
-
VOLUME_DEFAULT
public static final float VOLUME_DEFAULT- See Also:
-
ATTENUATION_DISTANCE_DEFAULT
public static final int ATTENUATION_DISTANCE_DEFAULT- See Also:
-
-
Constructor Details
-
CustomSoundInstance
public CustomSoundInstance(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, boolean looping, int delay, net.minecraft.client.resources.sounds.SoundInstance.Attenuation attenuation, double x, double y, double z, boolean relative, int attenuationDistance)
-
-
Method Details
-
getAttenuationDistance
public int getAttenuationDistance() -
ui
public static CustomSoundInstance ui(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume) -
world
public static CustomSoundInstance world(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume, net.minecraft.world.phys.Vec3 position, boolean relative, int attenuationDistance) -
getVolume
public float getVolume()- Specified by:
getVolume
in interfacenet.minecraft.client.resources.sounds.SoundInstance
- Overrides:
getVolume
in classnet.minecraft.client.resources.sounds.AbstractSoundInstance
-
getPitch
public float getPitch()- Specified by:
getPitch
in interfacenet.minecraft.client.resources.sounds.SoundInstance
- Overrides:
getPitch
in classnet.minecraft.client.resources.sounds.AbstractSoundInstance
-
resolve
public net.minecraft.client.sounds.WeighedSoundEvents resolve(net.minecraft.client.sounds.SoundManager manager) - Specified by:
resolve
in interfacenet.minecraft.client.resources.sounds.SoundInstance
- Overrides:
resolve
in classnet.minecraft.client.resources.sounds.AbstractSoundInstance
-