Package etithespirit.mixin.mixins
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 TypeMethodDescriptionabstract net.minecraft.sounds.SoundSource
ShadowsEntity.getSoundSource()
abstract double
getX()
ShadowsEntity.getX()
abstract double
getY()
ShadowsEntity.getY()
abstract double
getZ()
ShadowsEntity.getZ()
abstract boolean
isSilent()
ShadowsEntity.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 ofEntity.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) ShadowsEntity.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
Methods inherited from interface etithespirit.mixin.helpers.ISelfProvider
selfProvider$clientPlayer, selfProvider$player, selfProvider$self, selfProvider$serverPlayer, selfProvider$world
-
Method Details
-
isSilent
public abstract boolean isSilent()ShadowsEntity.isSilent()
- Returns:
- True if this entity does not play sound.
-
getX
public abstract double getX()ShadowsEntity.getX()
- Returns:
- The X component of this entity's position.
-
getY
public abstract double getY()ShadowsEntity.getY()
- Returns:
- The Y component of this entity's position.
-
getZ
public abstract double getZ()ShadowsEntity.getZ()
- Returns:
- The Z component of this entity's position.
-
getSoundSource
public abstract net.minecraft.sounds.SoundSource getSoundSource()ShadowsEntity.getSoundSource()
- Returns:
- The category of sound that this entity emits.
-
playSound
public abstract void playSound(net.minecraft.sounds.SoundEvent soundIn, float volume, float pitch) ShadowsEntity.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 ofEntity.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.
-