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);
}
Aggregations