当前位置: 首页>>代码示例>>Java>>正文


Java DefaultArtifactVersion类代码示例

本文整理汇总了Java中cpw.mods.fml.common.versioning.DefaultArtifactVersion的典型用法代码示例。如果您正苦于以下问题:Java DefaultArtifactVersion类的具体用法?Java DefaultArtifactVersion怎么用?Java DefaultArtifactVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultArtifactVersion类属于cpw.mods.fml.common.versioning包,在下文中一共展示了DefaultArtifactVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ItemElectricBase

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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();
        }
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:23,代码来源:ItemElectricBase.java

示例2: func_73863_a

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
@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);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:27,代码来源:GuiModsMissing.java

示例3: drawScreen

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
@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);
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:27,代码来源:GuiModsMissing.java

示例4: func_73863_a

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
@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);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:27,代码来源:GuiModsMissing.java

示例5: acceptVersion

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:NetworkModHandler.java

示例6: versionCheck

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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);
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:36,代码来源:MicdoodlePlugin.java

示例7: versionCheck

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:30,代码来源:CodeChickenCorePlugin.java

示例8: acceptVersion

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
public boolean acceptVersion(String version)
{
    if (acceptableRange!=null)
    {
        return acceptableRange.containsVersion(new DefaultArtifactVersion(version));
    }

    return container.getVersion().equals(version);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:10,代码来源:NetworkModHolder.java

示例9: APIContainer

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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();
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:12,代码来源:ModAPIManager.java

示例10: startVersionCheck

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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();
}
 
开发者ID:aziascreations,项目名称:Minecraft-Vending-Machine-Revamped,代码行数:41,代码来源:VendingMachineVersion.java

示例11: NewRadicalBotany

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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));
}
 
开发者ID:CannibalVox,项目名称:NewRadicalBotany,代码行数:15,代码来源:NewRadicalBotany.java

示例12: init

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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();
}
 
开发者ID:Dragon9815,项目名称:PlayerInterfaceMod,代码行数:13,代码来源:RecipeSetThermalExpansion.java

示例13: sameOrNewerVersion

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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;
}
 
开发者ID:OpenMods,项目名称:OpenPeripheral-Integration,代码行数:9,代码来源:OpenPeripheralIntegration.java

示例14: isModLoaded

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
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());
}
 
开发者ID:Tonius,项目名称:NEI-Integration,代码行数:12,代码来源:Utils.java

示例15: drawScreen

import cpw.mods.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
@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);
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:31,代码来源:GuiModsMissing.java


注:本文中的cpw.mods.fml.common.versioning.DefaultArtifactVersion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。