/* * Decompiled with CFR 0.152. */ package com.vinlanx.explosionoverhaul.client; import com.vinlanx.explosionoverhaul.Config; import com.vinlanx.explosionoverhaul.ExplosionOverhaul; import com.vinlanx.explosionoverhaul.client.IntroSplashScreen; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.TitleScreen; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid="explosionoverhaul", bus=Mod.EventBusSubscriber.Bus.FORGE, value={Dist.CLIENT}) public class FirstTimeSetupHandler { private static boolean hasChecked = false; private static boolean pendingShowIntro = false; @SubscribeEvent public static void onClientTick(TickEvent.ClientTickEvent event) { if (event.phase != TickEvent.Phase.END) { return; } Minecraft mc = Minecraft.m_91087_(); if (!hasChecked && mc.f_91080_ instanceof TitleScreen) { hasChecked = true; ExplosionOverhaul.LOGGER.info("Detected TitleScreen on client, hasChecked=true"); if (Config.isFirstLaunch()) { pendingShowIntro = true; } } if (!pendingShowIntro) { return; } if (mc.f_91080_ instanceof TitleScreen) { pendingShowIntro = false; ExplosionOverhaul.LOGGER.info("Showing IntroSplashScreen (first launch)"); mc.m_91152_((Screen)new IntroSplashScreen()); } } static { ExplosionOverhaul.LOGGER.info("FirstTimeSetupHandler class loaded (waiting for TitleScreen)"); } }