Package etithespirit.orimod.client.audio
Class TrackableSound
java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
etithespirit.orimod.client.audio.TrackableSound
- All Implemented Interfaces:
net.minecraft.client.resources.sounds.SoundInstance
,net.minecraft.client.resources.sounds.TickableSoundInstance
public class TrackableSound
extends net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.sounds.SoundInstance
net.minecraft.client.resources.sounds.SoundInstance.Attenuation
-
Field Summary
Fields inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
attenuation, delay, location, looping, pitch, random, relative, sound, source, volume, x, y, z
-
Constructor Summary
ConstructorsConstructorDescriptionTrackableSound
(net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource category) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
resetGetNew
(boolean inheritVolume, boolean inheritPitch) Clones this instance so that it can be played again.void
setPitch
(float pitch) void
setVolume
(float volume) void
void
tick()
Methods inherited from class net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
stop
Methods inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getVolume, getX, getY, getZ, isLooping, isRelative, resolve, 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
getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getStream, getVolume, getX, getY, getZ, isLooping, isRelative, resolve
-
Constructor Details
-
TrackableSound
public TrackableSound(net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource category)
-
-
Method Details
-
resetGetNew
Clones this instance so that it can be played again. Stops this instance if it is not stopped already.- Parameters:
inheritVolume
- If true, the volume of this sound will be applied to the new one.inheritPitch
- If true, the pitch of this sound will be applied to the new one.- Returns:
- A new instance of
TrackableSound
with identical properties
-
tick
public void tick() -
setVolume
public void setVolume(float volume) -
setPitch
public void setPitch(float pitch) -
isStopped
public boolean isStopped()- Specified by:
isStopped
in interfacenet.minecraft.client.resources.sounds.TickableSoundInstance
- Overrides:
isStopped
in classnet.minecraft.client.resources.sounds.AbstractTickableSoundInstance
-
stopAudio
public void stopAudio() -
canStartSilent
public boolean canStartSilent() -
canPlaySound
public boolean canPlaySound()
-