Class SoundLoopSpell
java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
com.binaris.wizardry.client.sound.SoundLoop
com.binaris.wizardry.client.sound.SoundLoopSpell
- All Implemented Interfaces:
net.minecraft.client.resources.sounds.SoundInstance,net.minecraft.client.resources.sounds.TickableSoundInstance
- Direct Known Subclasses:
SoundLoopSpell.SoundLoopSpellEntity,SoundLoopSpell.SoundLoopSpellLocation
Encapsulate all the work and info needed to cast spells in the mod, this contains 3 subclasses
that are used depending on how you're casting a spell
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSound loop from a spell cast by a dispenserstatic classSound loop from a spell cast by an entitystatic classstatic classSound loop from a spell cast just by the location, normally a /cast commandNested classes/interfaces inherited from class com.binaris.wizardry.client.sound.SoundLoop
SoundLoop.ISoundFactoryNested 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, pitch, random, relative, sound, source, volume, x, y, z -
Constructor Summary
ConstructorsConstructorDescriptionSoundLoopSpell(net.minecraft.sounds.SoundEvent start, net.minecraft.sounds.SoundEvent loop, net.minecraft.sounds.SoundEvent end, float volume, SoundLoop.ISoundFactory factory, Spell spell) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasActiveLoop(net.minecraft.world.entity.LivingEntity entity, Spell spell) Checks if a sound loop for the given entity and spell already existsprotected abstract booleanstillCasting(Spell spell) voidtick()Used to know when the sound is ready to be looped, all the rest of the tick logic is handled in the client tickSoundLoop.onClientTick(EBClientTickEvent)Methods inherited from class com.binaris.wizardry.client.sound.SoundLoop
addLoop, endLoop, hasActiveLoopMatching, onClientTick, stopStartAndLoopMethods inherited from class net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
isStopped, stopMethods inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getVolume, getX, getY, getZ, isLooping, isRelative, resolve, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.resources.sounds.SoundInstance
canPlaySound, canStartSilent, getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getStream, getVolume, getX, getY, getZ, isLooping, isRelative, resolve
-
Constructor Details
-
SoundLoopSpell
public SoundLoopSpell(net.minecraft.sounds.SoundEvent start, net.minecraft.sounds.SoundEvent loop, net.minecraft.sounds.SoundEvent end, float volume, SoundLoop.ISoundFactory factory, Spell spell)
-
-
Method Details
-
hasActiveLoop
Checks if a sound loop for the given entity and spell already exists -
stillCasting
-
tick
public void tick()Description copied from class:SoundLoopUsed to know when the sound is ready to be looped, all the rest of the tick logic is handled in the client tickSoundLoop.onClientTick(EBClientTickEvent)
-