java类cpw.mods.fml.relauncher.FileListHelper的实例源码

ModDiscoverer.java 文件源码 项目:TRHS_Club_Mod_2016 阅读 26 收藏 0 点赞 0 评论 0
public void findModDirMods(File modsDir, File[] supplementalModFileCandidates)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);
    modList = FileListHelper.sortFileList(ObjectArrays.concat(modList, supplementalModFileCandidates, File.class));
    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
ModDiscoverer.java 文件源码 项目:CauldronGit 阅读 24 收藏 0 点赞 0 评论 0
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
ModDiscoverer.java 文件源码 项目:Cauldron 阅读 33 收藏 0 点赞 0 评论 0
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
ModDiscoverer.java 文件源码 项目:Cauldron 阅读 36 收藏 0 点赞 0 评论 0
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
ModDiscoverer.java 文件源码 项目:Cauldron 阅读 41 收藏 0 点赞 0 评论 0
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号