Class InjectEntityPlaySound

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
etithespirit.mixin.mixins.InjectEntityPlaySound
All Implemented Interfaces:
ISelfProvider, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.entity.Entity>

public abstract class InjectEntityPlaySound extends net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity> implements ISelfProvider
This covers the entity-wide sound interception system, for the sake of completeness.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract net.minecraft.sounds.SoundSource
    Shadows Entity.getSoundSource()
    abstract double
    Shadows Entity.getX()
    abstract double
    Shadows Entity.getY()
    abstract double
    Shadows Entity.getZ()
    abstract boolean
    Shadows Entity.isSilent()
    void
    onPlaySoundCalled(net.minecraft.sounds.SoundEvent soundIn, float volume, float pitch, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
    This injects into the beginning of Entity.playSound(SoundEvent, float, float) and pipes the event through my custom event handler.
    abstract void
    playSound(net.minecraft.sounds.SoundEvent soundIn, float volume, float pitch)
    Shadows Entity.playSound(SoundEvent, float, float)

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability
  • Method Details

    • isSilent

      public abstract boolean isSilent()
      Shadows Entity.isSilent()
      Returns:
      True if this entity does not play sound.
    • getX

      public abstract double getX()
      Shadows Entity.getX()
      Returns:
      The X component of this entity's position.
    • getY

      public abstract double getY()
      Shadows Entity.getY()
      Returns:
      The Y component of this entity's position.
    • getZ

      public abstract double getZ()
      Shadows Entity.getZ()
      Returns:
      The Z component of this entity's position.
    • getSoundSource

      public abstract net.minecraft.sounds.SoundSource getSoundSource()
      Shadows Entity.getSoundSource()
      Returns:
      The category of sound that this entity emits.
    • playSound

      public abstract void playSound(net.minecraft.sounds.SoundEvent soundIn, float volume, float pitch)
      Shadows Entity.playSound(SoundEvent, float, float)
      Parameters:
      soundIn - The sound to play.
      volume - The volume of the sound.
      pitch - The pitch of the sound.
    • onPlaySoundCalled

      public void onPlaySoundCalled(net.minecraft.sounds.SoundEvent soundIn, float volume, float pitch, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
      This injects into the beginning of Entity.playSound(SoundEvent, float, float) and pipes the event through my custom event handler.
      Parameters:
      soundIn - The sound that was played.
      volume - The volume the sound was played with.
      pitch - The pitch the sound was played with.
      ci - The Mixin callback info.