/* * Decompiled with CFR 0.152. */ package com.vinlanx.explosionoverhaul.client; import com.vinlanx.explosionoverhaul.client.IntroMusicManager; import net.neoforged.api.distmarker.Dist; import net.neoforged.neoforge.event.TickEvent; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.Mod; import net.neoforged.fml.common.EventBusSubscriber; @EventBusSubscriber(modid="explosionoverhaul", bus=EventBusSubscriber.Bus.GAME, value={Dist.CLIENT}) public class IntroMusicTickHandler { private static long lastTickTime = System.currentTimeMillis(); @SubscribeEvent public static void onClientTick(TickEvent.ClientTickEvent event) { if (event.phase != TickEvent.Phase.END) { return; } IntroMusicManager musicManager = IntroMusicManager.getInstance(); if (musicManager.isPlaying() || musicManager.isFadingOut()) { long currentTime = System.currentTimeMillis(); float deltaTime = (float)(currentTime - lastTickTime) / 1000.0f; lastTickTime = currentTime; musicManager.tick(deltaTime); } } }