Search in sources :

Example 1 with PlaySoundAtEntityEvent

use of net.minecraftforge.event.entity.PlaySoundAtEntityEvent in project MinecraftForge by MinecraftForge.

the class ForgeEventFactory method onPlaySoundAtEntity.

public static PlaySoundAtEntityEvent onPlaySoundAtEntity(Entity entity, SoundEvent name, SoundCategory category, float volume, float pitch) {
    PlaySoundAtEntityEvent event = new PlaySoundAtEntityEvent(entity, name, category, volume, pitch);
    MinecraftForge.EVENT_BUS.post(event);
    return event;
}
Also used : PlaySoundAtEntityEvent(net.minecraftforge.event.entity.PlaySoundAtEntityEvent)

Example 2 with PlaySoundAtEntityEvent

use of net.minecraftforge.event.entity.PlaySoundAtEntityEvent in project MinecraftForge by MinecraftForge.

the class ForgeEventFactory method onPlaySoundAtEntity.

public static PlaySoundAtEntityEvent onPlaySoundAtEntity(Entity entity, SoundEvent name, SoundSource category, float volume, float pitch) {
    PlaySoundAtEntityEvent event = new PlaySoundAtEntityEvent(entity, name, category, volume, pitch);
    MinecraftForge.EVENT_BUS.post(event);
    return event;
}
Also used : PlaySoundAtEntityEvent(net.minecraftforge.event.entity.PlaySoundAtEntityEvent)

Aggregations

PlaySoundAtEntityEvent (net.minecraftforge.event.entity.PlaySoundAtEntityEvent)2