Search in sources :

Example 1 with BasicSound

use of org.blockartistry.DynSurround.client.sound.BasicSound in project DynamicSurroundings by OreCruncher.

the class CraftingSoundEffect method onEvent.

@SubscribeEvent
public void onEvent(@Nonnull final ItemCraftedEvent event) {
    if (!ModOptions.sound.enableCraftingSound || !isClientValid(event))
        return;
    if (this.craftSoundThrottle >= (EnvironState.getTickCounter() - 30))
        return;
    this.craftSoundThrottle = EnvironState.getTickCounter();
    final ITrackedSound fx = getState().createSound(Sounds.CRAFTING, event.player);
    ((BasicSound<?>) fx).setRoutable(true);
    getState().playSound(fx);
}
Also used : ITrackedSound(org.blockartistry.lib.sound.ITrackedSound) BasicSound(org.blockartistry.DynSurround.client.sound.BasicSound) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 BasicSound (org.blockartistry.DynSurround.client.sound.BasicSound)1 ITrackedSound (org.blockartistry.lib.sound.ITrackedSound)1