Java 类cpw.mods.fml.common.versioning.DefaultArtifactVersion 实例源码

项目:4Space-5    文件:ItemElectricBase.java   
public ItemElectricBase()
{
    super();
    this.setMaxStackSize(1);
    this.setMaxDamage(100);
    this.setNoRepair();
    this.setMaxTransfer();

    this.mcVersion = new DefaultArtifactVersion((String) FMLInjectionData.data()[4]);

    if (EnergyConfigHandler.isIndustrialCraft2Loaded())
    {
        if (VersionParser.parseRange("[1.7.2]").containsVersion(mcVersion))
        {
            itemManagerIC2 = new ElectricItemManagerIC2();
        }
        else
        {
            itemManagerIC2 = new ElectricItemManagerIC2_1710();
        }
    }
}
项目:TRHS_Club_Mod_2016    文件:GuiModsMissing.java   
@Override
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.func_146276_q_();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.func_73732_a(this.field_146289_q, "Forge Mod Loader has found a problem with your minecraft installation", this.field_146294_l / 2, offset, 0xFFFFFF);
    offset+=10;
    this.func_73732_a(this.field_146289_q, "The mods and versions listed below could not be found", this.field_146294_l / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.func_73732_a(this.field_146289_q, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.field_146294_l / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.func_73732_a(this.field_146289_q, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.field_146294_l / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.func_73732_a(this.field_146289_q, "The file 'logs/fml-client-latest.log' contains more information", this.field_146294_l / 2, offset, 0xFFFFFF);
}
项目:CauldronGit    文件:GuiModsMissing.java   
@Override
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
    offset+=10;
    this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.drawCenteredString(this.fontRendererObj, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
}
项目:Cauldron    文件:GuiModsMissing.java   
@Override
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
    offset+=10;
    this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.drawCenteredString(this.fontRendererObj, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
}
项目:Cauldron    文件:GuiModsMissing.java   
@Override
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
    offset+=10;
    this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.drawCenteredString(this.fontRendererObj, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
}
项目:Cauldron    文件:GuiModsMissing.java   
@Override
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
    offset+=10;
    this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.drawCenteredString(this.fontRendererObj, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
}
项目:RuneCraftery    文件:GuiModsMissing.java   
@Override
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
    this.func_73873_v_();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    this.func_73732_a(this.field_73886_k, "Forge Mod Loader has found a problem with your minecraft installation", this.field_73880_f / 2, offset, 0xFFFFFF);
    offset+=10;
    this.func_73732_a(this.field_73886_k, "The mods and versions listed below could not be found", this.field_73880_f / 2, offset, 0xFFFFFF);
    offset+=5;
    for (ArtifactVersion v : modsMissing.missingMods)
    {
        offset+=10;
        if (v instanceof DefaultArtifactVersion)
        {
            DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
            if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
            {
                this.func_73732_a(this.field_73886_k, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.field_73880_f / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.func_73732_a(this.field_73886_k, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.field_73880_f / 2, offset, 0xEEEEEE);
    }
    offset+=20;
    this.func_73732_a(this.field_73886_k, "The file 'ForgeModLoader-client-0.log' contains more information", this.field_73880_f / 2, offset, 0xFFFFFF);
}
项目:RuneCraftery    文件:NetworkModHandler.java   
public boolean acceptVersion(String version)
{
    if (checkHandler != null)
    {
        try
        {
            return (Boolean)checkHandler.invoke(container.getMod(), version);
        }
        catch (Exception e)
        {
            FMLLog.log(Level.WARNING, e, "There was a problem invoking the checkhandler method %s for network mod id %s", checkHandler.getName(), container.getModId());
            return false;
        }
    }

    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:RuneCraftery    文件:NetworkModHandler.java   
public boolean acceptVersion(String version)
{
    if (checkHandler != null)
    {
        try
        {
            return (Boolean)checkHandler.invoke(container.getMod(), version);
        }
        catch (Exception e)
        {
            FMLLog.log(Level.WARNING, e, "There was a problem invoking the checkhandler method %s for network mod id %s", checkHandler.getName(), container.getModId());
            return false;
        }
    }

    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:BetterNutritionMod    文件:NetworkModHandler.java   
public boolean acceptVersion(String version)
{
    if (checkHandler != null)
    {
        try
        {
            return (Boolean)checkHandler.invoke(container.getMod(), version);
        }
        catch (Exception e)
        {
            FMLLog.log(Level.WARNING, e, "There was a problem invoking the checkhandler method %s for network mod id %s", checkHandler.getName(), container.getModId());
            return false;
        }
    }

    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:4Space-5    文件:MicdoodlePlugin.java   
public static void versionCheck(String reqVersion, String mod)
{
    final String mcVersion = (String) FMLInjectionData.data()[4];

    if (!VersionParser.parseRange(reqVersion).containsVersion(new DefaultArtifactVersion(mcVersion)))
    {
        final String err = "This version of " + mod + " does not support minecraft version " + mcVersion;
        System.err.println(err);

        final JEditorPane ep = new JEditorPane("text/html", "<html>" + err + "<br>Remove it from your mods folder and check <a href=\"http://micdoodle8.com\">here</a> for updates" + "</html>");

        ep.setEditable(false);
        ep.setOpaque(false);
        ep.addHyperlinkListener(new HyperlinkListener()
        {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent event)
            {
                try
                {
                    if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
                    {
                        Desktop.getDesktop().browse(event.getURL().toURI());
                    }
                }
                catch (final Exception e)
                {
                }
            }
        });

        JOptionPane.showMessageDialog(null, ep, "Fatal error", JOptionPane.ERROR_MESSAGE);
        System.exit(1);
    }
}
项目:4Space-5    文件:CodeChickenCorePlugin.java   
public static void versionCheck(String reqVersion, String mod) {
    String mcVersion = (String) FMLInjectionData.data()[4];
    if (!VersionParser.parseRange(reqVersion).containsVersion(new DefaultArtifactVersion(mcVersion))) {
        String err = "This version of " + mod + " does not support minecraft version " + mcVersion;
        logger.error(err);

        JEditorPane ep = new JEditorPane("text/html",
                "<html>" +
                        err +
                        "<br>Remove it from your coremods folder and check <a href=\"http://www.minecraftforum.net/topic/909223-\">here</a> for updates" +
                        "</html>");

        ep.setEditable(false);
        ep.setOpaque(false);
        ep.addHyperlinkListener(new HyperlinkListener()
        {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent event) {
                try {
                    if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
                        Desktop.getDesktop().browse(event.getURL().toURI());
                } catch (Exception ignored) {}
            }
        });

        JOptionPane.showMessageDialog(null, ep, "Fatal error", JOptionPane.ERROR_MESSAGE);
        System.exit(1);
    }
}
项目:TRHS_Club_Mod_2016    文件:NetworkModHolder.java   
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:TRHS_Club_Mod_2016    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:Minecraft-Vending-Machine-Revamped    文件:VendingMachineVersion.java   
public static void startVersionCheck() {
    try {
        URL url = new URL("https://raw.githubusercontent.com/AziasYur/Minecraft-Vending-Machine-Revamped/master/version.json");
        InputStream con = url.openStream();
        String data = new String(ByteStreams.toByteArray(con));
        con.close();

        Map<String, Object> json = new Gson().fromJson(data, Map.class);
        Map<String, String> versions = (Map<String, String>)json.get("versions");

        String ver;
        if(VendingMachineConfigs.checkBetaUpdate) {
            ver = versions.get(MinecraftForge.MC_VERSION + "-develop");
        } else {
            ver = versions.get(MinecraftForge.MC_VERSION + "-release");
        }
        ArtifactVersion current = new DefaultArtifactVersion(getVersion());

        if(ver!= null) {
            ArtifactVersion latest = new DefaultArtifactVersion(ver);
            int diff = latest.compareTo(current);

            if (diff == 0) {
                status = Status.UP_TO_DATE;
            } else if (diff < 0) {
                status = Status.AHEAD;
            } else {
                status = Status.OUTDATED;
            }
        } else {
            status = Status.AHEAD;
        }
    }
    catch (Exception e)
    {
        e.printStackTrace();
        status = Status.FAILED;
    }
    echoStatus();
}
项目:CauldronGit    文件:NetworkModHolder.java   
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:CauldronGit    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:NewRadicalBotany    文件:NewRadicalBotany.java   
public NewRadicalBotany() {
    super(new ModMetadata());

    ModMetadata metadata = getMetadata();
    metadata.modId = NewRadicalBotany.MODID;
    metadata.version = NewRadicalBotany.VERSION;
    metadata.name = "New Radical Botany";
    metadata.authorList = ImmutableList.of("Cannibalvox");
    metadata.url = "http://www.technicpack.net/";
    metadata.credits = "Developed by Technic";
    metadata.description = "Can't forget, you only get what you give.";
    metadata.requiredMods.add(new DefaultArtifactVersion("Botania", false));
    metadata.dependencies.add(new DefaultArtifactVersion("Botania", false));
}
项目:PlayerInterfaceMod    文件:RecipeSetThermalExpansion.java   
public void init() {
    boolean TELoaded = Loader.isModLoaded(TE);
    boolean TDLoaded = Loader.isModLoaded(TD);

    if (!TELoaded || !TDLoaded) {
        LogHelper.fatal("Thermal Expansion and Thermal Dynamics is required for Thermal Expansion recipes.");
        throw new MissingModsException(Collections.singleton((ArtifactVersion) new DefaultArtifactVersion((!TELoaded) ? TE : TD)));
    }

    getItems();
    setRecipes();
}
项目:OpenPeripheral-Integration    文件:OpenPeripheralIntegration.java   
private static boolean sameOrNewerVersion(String modid, String version) {
    final ModContainer modContainer = Loader.instance().getIndexedModList().get(modid);
    if (modContainer == null) return true;

    final ArtifactVersion targetVersion = new DefaultArtifactVersion(version);
    final ArtifactVersion actualVersion = modContainer.getProcessedVersion();
    return actualVersion.compareTo(targetVersion) >= 0;
}
项目:NEI-Integration    文件:Utils.java   
public static boolean isModLoaded(String modid, String versionRangeString) {
    if (!isModLoaded(modid)) {
        return false;
    }

    ModContainer mod = Loader.instance().getIndexedModList().get(modid);
    VersionRange versionRange = VersionParser.parseRange(versionRangeString);
    DefaultArtifactVersion required = new DefaultArtifactVersion(modid, versionRange);

    return required.containsVersion(mod.getProcessedVersion());
}
项目:Cauldron    文件:NetworkModHolder.java   
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:Cauldron    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:Cauldron    文件:NetworkModHolder.java   
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:Cauldron    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:Cauldron    文件:NetworkModHolder.java   
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
项目:Cauldron    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:Atmatm6_Mods    文件:MicdoodlePlugin.java   
public static void versionCheck(String reqVersion, String mod)
{
    final String mcVersion = (String) FMLInjectionData.data()[4];

    if (!VersionParser.parseRange(reqVersion).containsVersion(new DefaultArtifactVersion(mcVersion)))
    {
        final String err = "This version of " + mod + " does not support minecraft version " + mcVersion;
        System.err.println(err);

        final JEditorPane ep = new JEditorPane("text/html", "<html>" + err + "<br>Remove it from your mods folder and check <a href=\"http://micdoodle8.com\">here</a> for updates" + "</html>");

        ep.setEditable(false);
        ep.setOpaque(false);
        ep.addHyperlinkListener(new HyperlinkListener()
        {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent event)
            {
                try
                {
                    if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
                    {
                        Desktop.getDesktop().browse(event.getURL().toURI());
                    }
                }
                catch (final Exception e)
                {
                }
            }
        });

        JOptionPane.showMessageDialog(null, ep, "Fatal error", JOptionPane.ERROR_MESSAGE);
        System.exit(1);
    }
}
项目:RuneCraftery    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:RuneCraftery    文件:GuiModsMissing.java   
@Override

    /**
     * Draws the screen and all the components in it.
     */
    public void drawScreen(int par1, int par2, float par3)
    {
        this.drawDefaultBackground();
        int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
        this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
        offset+=10;
        this.drawCenteredString(this.fontRenderer, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
        offset+=5;
        for (ArtifactVersion v : modsMissing.missingMods)
        {
            offset+=10;
            if (v instanceof DefaultArtifactVersion)
            {
                DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
                if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
                {
                    this.drawCenteredString(this.fontRenderer, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                    continue;
                }
            }
            this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
        }
        offset+=20;
        this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
    }
项目:RuneCraftery    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:BetterNutritionMod    文件:GuiModsMissing.java   
@Override

    /**
     * Draws the screen and all the components in it.
     */
    public void drawScreen(int par1, int par2, float par3)
    {
        this.drawDefaultBackground();
        int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
        this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
        offset+=10;
        this.drawCenteredString(this.fontRenderer, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
        offset+=5;
        for (ArtifactVersion v : modsMissing.missingMods)
        {
            offset+=10;
            if (v instanceof DefaultArtifactVersion)
            {
                DefaultArtifactVersion dav =  (DefaultArtifactVersion)v;
                if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
                {
                    this.drawCenteredString(this.fontRenderer, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
                    continue;
                }
            }
            this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
        }
        offset+=20;
        this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
    }
项目:BetterNutritionMod    文件:ModAPIManager.java   
public APIContainer(String providedAPI, String apiVersion, File source, ArtifactVersion ownerMod)
{
    this.providedAPI = providedAPI;
    this.version = apiVersion;
    this.ownerMod = ownerMod;
    this.ourVersion = new DefaultArtifactVersion(providedAPI, apiVersion);
    this.referredMods = Lists.newArrayList();
    this.source = source;
    this.currentReferents = Sets.newHashSet();
    this.packages = Sets.newHashSet();
}
项目:TRHS_Club_Mod_2016    文件:ForgeVersion.java   
public static void startVersionCheck()
{
    new Thread("Forge Version Check")
    {
        @SuppressWarnings("unchecked")
        @Override
        public void run()
        {
            try
            {
                URL url = new URL("http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json");
                InputStream con = url.openStream();
                String data = new String(ByteStreams.toByteArray(con));
                con.close();

                Map<String, Object> json = new Gson().fromJson(data, Map.class);
                //String homepage = (String)json.get("homepage");
                Map<String, String> promos = (Map<String, String>)json.get("promos");

                String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");
                String lat = promos.get(MinecraftForge.MC_VERSION + "-latest");
                ArtifactVersion current = new DefaultArtifactVersion(getVersion());

                if (rec != null)
                {
                    ArtifactVersion recommended = new DefaultArtifactVersion(rec);
                    int diff = recommended.compareTo(current);

                    if (diff == 0)
                        status = UP_TO_DATE;
                    else if (diff < 0)
                    {
                        status = AHEAD;
                        if (lat != null)
                        {
                            if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                            {
                                status = OUTDATED;
                                target = lat;
                            }
                        }
                    }
                    else
                    {
                        status = OUTDATED;
                        target = rec;
                    }
                }
                else if (lat != null)
                {
                    if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                    {
                        status = BETA_OUTDATED;
                        target = lat;
                    }
                    else
                        status = BETA;
                }
                else
                    status = BETA;
            }
            catch (Exception e)
            {
                e.printStackTrace();
                status = FAILED;
            }
        }
    }.start();
}
项目:CauldronGit    文件:ForgeVersion.java   
public static void startVersionCheck()
{
    new Thread("Forge Version Check")
    {
        @SuppressWarnings("unchecked")
        @Override
        public void run()
        {
            try
            {
                URL url = new URL("http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json");
                InputStream con = url.openStream();
                String data = new String(ByteStreams.toByteArray(con));
                con.close();

                Map<String, Object> json = new Gson().fromJson(data, Map.class);
                //String homepage = (String)json.get("homepage");
                Map<String, String> promos = (Map<String, String>)json.get("promos");

                String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");
                String lat = promos.get(MinecraftForge.MC_VERSION + "-latest");
                ArtifactVersion current = new DefaultArtifactVersion(getVersion());

                if (rec != null)
                {
                    ArtifactVersion recommended = new DefaultArtifactVersion(rec);
                    int diff = recommended.compareTo(current);

                    if (diff == 0)
                        status = UP_TO_DATE;
                    else if (diff < 0)
                    {
                        status = AHEAD;
                        if (lat != null)
                        {
                            if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                            {
                                status = OUTDATED;
                                target = lat;
                            }
                        }
                    }
                    else
                    {
                        status = OUTDATED;
                        target = rec;
                    }
                }
                else if (lat != null)
                {
                    if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                    {
                        status = BETA_OUTDATED;
                        target = lat;
                    }
                    else
                        status = BETA;
                }
                else
                    status = BETA;
            }
            catch (Exception e)
            {
                e.printStackTrace();
                status = FAILED;
            }
        }
    }.start();
}
项目:Cauldron    文件:ForgeVersion.java   
public static void startVersionCheck()
{
    new Thread("Forge Version Check")
    {
        @SuppressWarnings("unchecked")
        @Override
        public void run()
        {
            try
            {
                URL url = new URL("http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json");
                InputStream con = url.openStream();
                String data = new String(ByteStreams.toByteArray(con));
                con.close();

                Map<String, Object> json = new Gson().fromJson(data, Map.class);
                //String homepage = (String)json.get("homepage");
                Map<String, String> promos = (Map<String, String>)json.get("promos");

                String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");
                String lat = promos.get(MinecraftForge.MC_VERSION + "-latest");
                ArtifactVersion current = new DefaultArtifactVersion(getVersion());

                if (rec != null)
                {
                    ArtifactVersion recommended = new DefaultArtifactVersion(rec);
                    int diff = recommended.compareTo(current);

                    if (diff == 0)
                        status = UP_TO_DATE;
                    else if (diff < 0)
                    {
                        status = AHEAD;
                        if (lat != null)
                        {
                            if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                            {
                                status = OUTDATED;
                                target = lat;
                            }
                        }
                    }
                    else
                    {
                        status = OUTDATED;
                        target = rec;
                    }
                }
                else if (lat != null)
                {
                    if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                    {
                        status = BETA_OUTDATED;
                        target = lat;
                    }
                    else
                        status = BETA;
                }
                else
                    status = BETA;
            }
            catch (Exception e)
            {
                e.printStackTrace();
                status = FAILED;
            }
        }
    }.start();
}
项目:Cauldron    文件:ForgeVersion.java   
public static void startVersionCheck()
{
    new Thread("Forge Version Check")
    {
        @SuppressWarnings("unchecked")
        @Override
        public void run()
        {
            try
            {
                URL url = new URL("http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json");
                InputStream con = url.openStream();
                String data = new String(ByteStreams.toByteArray(con));
                con.close();

                Map<String, Object> json = new Gson().fromJson(data, Map.class);
                //String homepage = (String)json.get("homepage");
                Map<String, String> promos = (Map<String, String>)json.get("promos");

                String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");
                String lat = promos.get(MinecraftForge.MC_VERSION + "-latest");
                ArtifactVersion current = new DefaultArtifactVersion(getVersion());

                if (rec != null)
                {
                    ArtifactVersion recommended = new DefaultArtifactVersion(rec);
                    int diff = recommended.compareTo(current);

                    if (diff == 0)
                        status = UP_TO_DATE;
                    else if (diff < 0)
                    {
                        status = AHEAD;
                        if (lat != null)
                        {
                            if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                            {
                                status = OUTDATED;
                                target = lat;
                            }
                        }
                    }
                    else
                    {
                        status = OUTDATED;
                        target = rec;
                    }
                }
                else if (lat != null)
                {
                    if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                    {
                        status = BETA_OUTDATED;
                        target = lat;
                    }
                    else
                        status = BETA;
                }
                else
                    status = BETA;
            }
            catch (Exception e)
            {
                e.printStackTrace();
                status = FAILED;
            }
        }
    }.start();
}
项目:Cauldron    文件:ForgeVersion.java   
public static void startVersionCheck()
{
    new Thread("Forge Version Check")
    {
        @SuppressWarnings("unchecked")
        @Override
        public void run()
        {
            try
            {
                URL url = new URL("http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json");
                InputStream con = url.openStream();
                String data = new String(ByteStreams.toByteArray(con));
                con.close();

                Map<String, Object> json = new Gson().fromJson(data, Map.class);
                //String homepage = (String)json.get("homepage");
                Map<String, String> promos = (Map<String, String>)json.get("promos");

                String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");
                String lat = promos.get(MinecraftForge.MC_VERSION + "-latest");
                ArtifactVersion current = new DefaultArtifactVersion(getVersion());

                if (rec != null)
                {
                    ArtifactVersion recommended = new DefaultArtifactVersion(rec);
                    int diff = recommended.compareTo(current);

                    if (diff == 0)
                        status = UP_TO_DATE;
                    else if (diff < 0)
                    {
                        status = AHEAD;
                        if (lat != null)
                        {
                            if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                            {
                                status = OUTDATED;
                                target = lat;
                            }
                        }
                    }
                    else
                    {
                        status = OUTDATED;
                        target = rec;
                    }
                }
                else if (lat != null)
                {
                    if (current.compareTo(new DefaultArtifactVersion(lat)) < 0)
                    {
                        status = BETA_OUTDATED;
                        target = lat;
                    }
                    else
                        status = BETA;
                }
                else
                    status = BETA;
            }
            catch (Exception e)
            {
                e.printStackTrace();
                status = FAILED;
            }
        }
    }.start();
}