package dev.micle.firefly_bush_backport;

import com.mojang.logging.LogUtils;
import dev.micle.firefly_bush_backport.proxy.IProxy;
import dev.micle.firefly_bush_backport.proxy.Proxy;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger;

@Mod(FireflyBushBackport.MOD_ID)
public class FireflyBushBackport {
    public static final String MOD_ID = "firefly_bush_backport";
    public static final Logger LOGGER = LogUtils.getLogger();
    private static FMLJavaModLoadingContext fmlJavaModLoadingContext;
    private static IProxy proxy;

    public FireflyBushBackport(FMLJavaModLoadingContext context) {
        fmlJavaModLoadingContext = context;

        proxy = DistExecutor.safeRunForDist(
                () -> Proxy.Client::new,
                () -> Proxy.Server::new
        );
    }

    public static FMLJavaModLoadingContext getFMLJavaModLoadingContext() {
        return fmlJavaModLoadingContext;
    }
}
