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

public abstract class SoundLoopSpell extends SoundLoop
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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Sound loop from a spell cast by a dispenser
    static class 
    Sound loop from a spell cast by an entity
    static class 
     
    static class 
    Sound loop from a spell cast just by the location, normally a /cast command

    Nested classes/interfaces inherited from class com.binaris.wizardry.client.sound.SoundLoop

    SoundLoop.ISoundFactory

    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, pitch, random, relative, sound, source, volume, x, y, z
  • Constructor Summary

    Constructors
    Constructor
    Description
    SoundLoopSpell(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 Type
    Method
    Description
    static boolean
    hasActiveLoop(net.minecraft.world.entity.LivingEntity entity, Spell spell)
    Checks if a sound loop for the given entity and spell already exists
    protected abstract boolean
     
    void
    Used to know when the sound is ready to be looped, all the rest of the tick logic is handled in the client tick SoundLoop.onClientTick(EBClientTickEvent)

    Methods inherited from class com.binaris.wizardry.client.sound.SoundLoop

    addLoop, endLoop, hasActiveLoopMatching, onClientTick, stopStartAndLoop

    Methods inherited from class net.minecraft.client.resources.sounds.AbstractTickableSoundInstance

    isStopped, 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

    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

      public static boolean hasActiveLoop(net.minecraft.world.entity.LivingEntity entity, Spell spell)
      Checks if a sound loop for the given entity and spell already exists
    • stillCasting

      protected abstract boolean stillCasting(Spell spell)
    • tick

      public void tick()
      Description copied from class: SoundLoop
      Used to know when the sound is ready to be looped, all the rest of the tick logic is handled in the client tick SoundLoop.onClientTick(EBClientTickEvent)
      Specified by:
      tick in interface net.minecraft.client.resources.sounds.TickableSoundInstance
      Overrides:
      tick in class SoundLoop