// 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 com.google.common.base.Joiner;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.versioning.ComparableVersion;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
package com.github.lunatrius.core.version;



public class VersionChecker {
    public static final String VER_CHECK_API_URL = "http://mc.lunatri.us/json?v=%d&mc=%s&limit=5";
    public static final int VER_CHECK_API_VER = 2;

    public static final String UPDATE_URL = "https://mods.io/mods?author=Lunatrius";

    private static final List<ModContainer> REGISTERED_MODS = new ArrayList<ModContainer>();
    private static final Joiner NEWLINE_JOINER = Joiner.on('\n');

    public static void registerMod(final ModContainer container, final String forgeVersion) {
        REGISTERED_MODS.add(container);

        final ModMetadata metadata = container.getMetadata();
        if (metadata.description != null) {
            metadata.description += "\n---\nCompiled against Forge " + forgeVersion;
        }
    }

    public static void startVersionCheck() {
        new Thread("LunatriusCore Version Check") {
            @Override
            public void run() {
                try {
// 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/VersionChecker.java
import com.github.lunatrius.core.reference.Reference;
import com.google.common.base.Joiner;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.versioning.ComparableVersion;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

package com.github.lunatrius.core.version;



public class VersionChecker {
    public static final String VER_CHECK_API_URL = "http://mc.lunatri.us/json?v=%d&mc=%s&limit=5";
    public static final int VER_CHECK_API_VER = 2;

    public static final String UPDATE_URL = "https://mods.io/mods?author=Lunatrius";

    private static final List<ModContainer> REGISTERED_MODS = new ArrayList<ModContainer>();
    private static final Joiner NEWLINE_JOINER = Joiner.on('\n');

    public static void registerMod(final ModContainer container, final String forgeVersion) {
        REGISTERED_MODS.add(container);

        final ModMetadata metadata = container.getMetadata();
        if (metadata.description != null) {
            metadata.description += "\n---\nCompiled against Forge " + forgeVersion;
        }
    }

    public static void startVersionCheck() {
        new Thread("LunatriusCore Version Check") {
            @Override
            public void run() {
                try {
                    if ("null".equals(Reference.MINECRAFT)) {