package top.r3944realms.lib39.example.core.compat;

import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.resources.ResourceLocation;
import top.r3944realms.lib39.Lib39;
import top.r3944realms.lib39.core.compat.ICompat;

/**
 * The type Lib 39 compat.
 */
public class FabricLib39Compat implements ICompat {
    /**
     * The Initialized.
     */
    boolean initialized = false;
    /**
     * The constant INSTANCE.
     */
    public static FabricLib39Compat INSTANCE = new FabricLib39Compat();
    /**
     * The constant ID.
     */
    public static ResourceLocation ID = Lib39.rl("lib39");

    @Override
    public void setInitialize(boolean initialize) {
        this.initialized = initialize;
    }

    @Override
    public boolean isInitialized() {
        return initialized;
    }

    @Override
    public ResourceLocation id() {
        return ID;
    }

    @Override
    public boolean isModLoaded() {
        return FabricLoader.getInstance().isModLoaded("lib39");
    }

    @Override
    public void initialize() {
        Lib39.LOGGER.info("[Lib39 Compat] Init!");
    }

    @Override
    public void onLoadComplete() {
        Lib39.LOGGER.info("[Lib39 Compat] Complete!");
    }
}
