Class SpiritSoundProvider

java.lang.Object
etithespirit.orimod.client.audio.SpiritSoundProvider

public class SpiritSoundProvider extends Object
Provides methods to acquire context-specific sounds for spirits performing various actions.
Author:
Eti
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.BlockPos
    getBlockInPos(net.minecraft.world.entity.Entity entity)
    Returns the BlockPos of the block the entity is standing in.
    static net.minecraft.core.BlockPos
    getBlockOnPos(net.minecraft.world.entity.Entity entity)
    Returns the BlockPos of the block the entity is standing on.
    static net.minecraft.sounds.SoundEvent
    Returns a sound associated with attacking an entity with the given damage level.
    static net.minecraft.sounds.SoundEvent
    Returns a sound associated with attacking an entity alongside the given damage effect.
    static net.minecraft.sounds.SoundEvent
    Returns the breath sound corresponding to the depth passed in.
    static net.minecraft.sounds.SoundEvent
    getSpiritDashSound(boolean willImpactWallClosely)
    Returns a sound for dashing.
    static net.minecraft.sounds.SoundEvent
    getSpiritDeathSound(net.minecraft.world.damagesource.DamageSource damageType)
    Returns a death sound that is contextual to the given damage source.
    static net.minecraft.sounds.SoundEvent
    getSpiritHurtSound(net.minecraft.world.damagesource.DamageSource damageType)
    Returns the spirit damage sound.
    static net.minecraft.sounds.SoundEvent
    getSpiritJumpSound(int numberOfJumps)
    Returns a sound based on the amount of times the player has jumped.
    static net.minecraft.sounds.SoundEvent
    Returns a sound associated with a hard-light shield being impacted.
    static net.minecraft.sounds.SoundEvent
    getSpiritSplashSound(boolean isBigSplash)
    Returns a splashing sound for when a spirit falls into water.
    static net.minecraft.sounds.SoundEvent
    getSpiritStepSound(net.minecraft.world.entity.LivingEntity entity, net.minecraft.core.BlockPos on, net.minecraft.core.BlockPos in, net.minecraft.sounds.SoundEvent vanilla)
    Returns a unique sound for stepping on a given block as a spirit.
    static net.minecraft.sounds.SoundEvent
    getSpiritStepSound(net.minecraft.world.entity.LivingEntity entity, net.minecraft.sounds.SoundEvent vanilla)
    Returns a unique sound for stepping on a given block as a spirit.
    static net.minecraft.sounds.SoundEvent
    getSpiritSwimSound(boolean belowWater)
    Returns a swimming sound for spirits.
    static net.minecraft.sounds.SoundEvent
    getSpiritWallJumpSound(net.minecraft.core.BlockPos onBlock)
    Returns a sound for wall jumping.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpiritSoundProvider

      public SpiritSoundProvider()
  • Method Details

    • getBlockOnPos

      public static net.minecraft.core.BlockPos getBlockOnPos(@Nonnull net.minecraft.world.entity.Entity entity)
      Returns the BlockPos of the block the entity is standing on.
      Parameters:
      entity - The entity that provides the position.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getBlockInPos

      public static net.minecraft.core.BlockPos getBlockInPos(@Nonnull net.minecraft.world.entity.Entity entity)
      Returns the BlockPos of the block the entity is standing in.
      Parameters:
      entity - The entity that provides the position.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritStepSound

      public static net.minecraft.sounds.SoundEvent getSpiritStepSound(@Nonnull net.minecraft.world.entity.LivingEntity entity, @Nullable net.minecraft.sounds.SoundEvent vanilla)
      Returns a unique sound for stepping on a given block as a spirit.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritStepSound

      public static net.minecraft.sounds.SoundEvent getSpiritStepSound(@Nonnull net.minecraft.world.entity.LivingEntity entity, @Nonnull net.minecraft.core.BlockPos on, @Nonnull net.minecraft.core.BlockPos in, @Nullable net.minecraft.sounds.SoundEvent vanilla)
      Returns a unique sound for stepping on a given block as a spirit.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritHurtSound

      public static net.minecraft.sounds.SoundEvent getSpiritHurtSound(@Nonnull net.minecraft.world.damagesource.DamageSource damageType)
      Returns the spirit damage sound.
      Parameters:
      damageType - The type of damage inflicted.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritDeathSound

      public static net.minecraft.sounds.SoundEvent getSpiritDeathSound(@Nonnull net.minecraft.world.damagesource.DamageSource damageType)
      Returns a death sound that is contextual to the given damage source.
      Parameters:
      damageType - The type of damage inflicted.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritDashSound

      public static net.minecraft.sounds.SoundEvent getSpiritDashSound(boolean willImpactWallClosely)
      Returns a sound for dashing. willImpactWallClosely should be true if a wall that will block the dash is within a short distance (around 1.5 blocks) of the player's direction.
      Parameters:
      willImpactWallClosely - Whether or not the player will impact a wall immediately after dashing.
    • getSpiritSwimSound

      public static net.minecraft.sounds.SoundEvent getSpiritSwimSound(boolean belowWater)
      Returns a swimming sound for spirits.
      Parameters:
      belowWater - Whether or not the player is swimming below water vs. treading above its surface.
    • getSpiritSplashSound

      public static net.minecraft.sounds.SoundEvent getSpiritSplashSound(boolean isBigSplash)
      Returns a splashing sound for when a spirit falls into water.
      Parameters:
      isBigSplash - Whether or not the splash is big.
    • getSpiritJumpSound

      public static net.minecraft.sounds.SoundEvent getSpiritJumpSound(int numberOfJumps)
      Returns a sound based on the amount of times the player has jumped. Expected to be 1, 2, or 3. Any value outside of that range will return a silent sound.
      Parameters:
      numberOfJumps - The amount of jumps that have been performed, counting the initial jump off of the ground.
    • getSpiritWallJumpSound

      public static net.minecraft.sounds.SoundEvent getSpiritWallJumpSound(@Nonnull net.minecraft.core.BlockPos onBlock)
      Returns a sound for wall jumping. As of writing, this does not respect the block's material.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritShieldImpactSound

      public static net.minecraft.sounds.SoundEvent getSpiritShieldImpactSound(boolean broke)
      Returns a sound associated with a hard-light shield being impacted.
      Parameters:
      broke - Whether or not the shield broke as a result of this impact.
    • getSpiritAttackSound

      public static net.minecraft.sounds.SoundEvent getSpiritAttackSound(@Nonnull DamageLevel level)
      Returns a sound associated with attacking an entity with the given damage level.
      Parameters:
      level - The damage level.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritAttackTypeSound

      public static net.minecraft.sounds.SoundEvent getSpiritAttackTypeSound(@Nonnull SpecialAttackType type)
      Returns a sound associated with attacking an entity alongside the given damage effect.
      Parameters:
      type - The damage type.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.
    • getSpiritBreathSound

      public static net.minecraft.sounds.SoundEvent getSpiritBreathSound(@Nonnull BreathLevel level)
      Returns the breath sound corresponding to the depth passed in.
      Parameters:
      level - The urgency of the breath.
      Throws:
      ArgumentNullException - if any arguments denoted as @Nonnull are null.