// Path: src/main/java/com/github/lunatrius/core/reference/Reference.java
// public class Reference {
//     public static final String MODID = "lunatriuscore";
//     public static final String NAME = "LunatriusCore";
//     public static final String VERSION = "${version}";
//     public static final String FORGE = "${forgeversion}";
//     public static final String MINECRAFT = "${mcversion}";
//     public static final String PROXY_SERVER = "com.github.lunatrius.core.proxy.ServerProxy";
//     public static final String PROXY_CLIENT = "com.github.lunatrius.core.proxy.ClientProxy";
// 
//     public static Logger logger = LogManager.getLogger(Reference.MODID);
// }


import com.github.lunatrius.core.reference.Reference;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.versioning.ComparableVersion;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.util.Map;
package com.github.lunatrius.core.version;



/**
 * This class/helper is a workaround for Forge's one mod per version file standard.
 */
public class ForgeVersionCheck {
    public static ForgeVersion.Status getStatus(final ComparableVersion versionRemote, final ComparableVersion versionLocal) {
        final int diff = versionRemote.compareTo(versionLocal);

        if (diff == 0) {
            return ForgeVersion.Status.UP_TO_DATE;
        }

        if (diff > 0) {
            return ForgeVersion.Status.OUTDATED;
        }

        return ForgeVersion.Status.AHEAD;
    }

    public static void notify(final ModContainer container, final ForgeVersion.Status status, final ComparableVersion target, final Map<ComparableVersion, String> changes, final String url) {
        try {
            final Map<ModContainer, ForgeVersion.CheckResult> versionMap = getVersionMap();
            final ForgeVersion.CheckResult checkResult = getCheckResult(status, target, changes, url);

            if (versionMap != null && checkResult != null) {
                versionMap.put(container, checkResult);
            }
        } catch (final Throwable t) {
// Path: src/main/java/com/github/lunatrius/core/reference/Reference.java
// public class Reference {
//     public static final String MODID = "lunatriuscore";
//     public static final String NAME = "LunatriusCore";
//     public static final String VERSION = "${version}";
//     public static final String FORGE = "${forgeversion}";
//     public static final String MINECRAFT = "${mcversion}";
//     public static final String PROXY_SERVER = "com.github.lunatrius.core.proxy.ServerProxy";
//     public static final String PROXY_CLIENT = "com.github.lunatrius.core.proxy.ClientProxy";
// 
//     public static Logger logger = LogManager.getLogger(Reference.MODID);
// }


// Path: src/main/java/com/github/lunatrius/core/version/ForgeVersionCheck.java
import com.github.lunatrius.core.reference.Reference;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.versioning.ComparableVersion;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.util.Map;

package com.github.lunatrius.core.version;



/**
 * This class/helper is a workaround for Forge's one mod per version file standard.
 */
public class ForgeVersionCheck {
    public static ForgeVersion.Status getStatus(final ComparableVersion versionRemote, final ComparableVersion versionLocal) {
        final int diff = versionRemote.compareTo(versionLocal);

        if (diff == 0) {
            return ForgeVersion.Status.UP_TO_DATE;
        }

        if (diff > 0) {
            return ForgeVersion.Status.OUTDATED;
        }

        return ForgeVersion.Status.AHEAD;
    }

    public static void notify(final ModContainer container, final ForgeVersion.Status status, final ComparableVersion target, final Map<ComparableVersion, String> changes, final String url) {
        try {
            final Map<ModContainer, ForgeVersion.CheckResult> versionMap = getVersionMap();
            final ForgeVersion.CheckResult checkResult = getCheckResult(status, target, changes, url);

            if (versionMap != null && checkResult != null) {
                versionMap.put(container, checkResult);
            }
        } catch (final Throwable t) {
            Reference.logger.error("Failed to notify Forge!", t);