Scaffold NeoForge port
Some checks failed
Build / build (push) Failing after 13s

This commit is contained in:
MrSphay
2026-05-04 12:09:37 +02:00
parent 0b99b2130a
commit dcd08a876e
559 changed files with 19697 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
/*
* 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.neoforged.api.distmarker.Dist;
import net.neoforged.neoforge.event.TickEvent;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.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)");
}
}