Class RestrictedSoundInstance<T extends net.minecraft.world.entity.Entity>

java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
net.frozenblock.lib.sound.api.RestrictedSoundInstance<T>
All Implemented Interfaces:
net.fabricmc.fabric.api.client.sound.v1.FabricSoundInstance, net.minecraft.client.resources.sounds.SoundInstance, net.minecraft.client.resources.sounds.TickableSoundInstance
Direct Known Subclasses:
RestrictedMovingFadingDistanceSwitchingSound, RestrictedMovingFadingDistanceSwitchingSoundLoop, RestrictedMovingSound, RestrictedMovingSoundLoop, RestrictedStartingSound

public abstract class RestrictedSoundInstance<T extends net.minecraft.world.entity.Entity> 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
    Modifier and Type
    Field
    Description
    protected final T
     
    protected boolean
     
     

    Fields inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance

    attenuation, delay, location, looping, pitch, random, relative, sound, source, volume, x, y, z

    Fields inherited from interface net.fabricmc.fabric.api.client.sound.v1.FabricSoundInstance

    EMPTY_SOUND
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RestrictedSoundInstance(net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource soundSource, net.minecraft.util.RandomSource randomSource, T entity, SoundPredicate.LoopPredicate<T> predicate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
     
    boolean
     

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

    isStopped

    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.fabricmc.fabric.api.client.sound.v1.FabricSoundInstance

    getAudioStream

    Methods inherited from interface net.minecraft.client.resources.sounds.SoundInstance

    getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getVolume, getX, getY, getZ, isLooping, isRelative, resolve

    Methods inherited from interface net.minecraft.client.resources.sounds.TickableSoundInstance

    tick
  • Field Details

    • entity

      protected final T extends net.minecraft.world.entity.Entity entity
    • predicate

      protected final SoundPredicate.LoopPredicate<T extends net.minecraft.world.entity.Entity> predicate
    • firstTick

      protected boolean firstTick
  • Constructor Details

    • RestrictedSoundInstance

      protected RestrictedSoundInstance(net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource soundSource, net.minecraft.util.RandomSource randomSource, T entity, SoundPredicate.LoopPredicate<T> predicate)
  • Method Details

    • canPlaySound

      public boolean canPlaySound()
    • canStartSilent

      public boolean canStartSilent()
    • stop

      public void stop()
      Overrides:
      stop in class net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
    • test

      public boolean test()