• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DefaultArtifactVersion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: networkCheck

import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
@NetworkCheckHandler
public static boolean networkCheck(Map<String, String> mods, Side side) {
    
    if (mods.containsKey(MODID)) {
        
        if (COMPATIBLE_RANGE.containsVersion(new DefaultArtifactVersion(mods.get(MODID)))) {
            
            LOG.info("{} version {} compatible with version {} {}, allowing connection", MODID, VERSION, mods.get(MODID), side);
            return true;
        }
        
        LOG.info("{} version {} not compatible with version {} {}, denying connection", MODID, VERSION, mods.get(MODID), side);
        return false;
    }
    
    LOG.info("{} not found on {}, denying connection", MODID, side);
    return false;
}
 
开发者ID:JayAvery,项目名称:geomastery,代码行数:19,代码来源:Geomastery.java


示例2: drawScreen

import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
/**
 * Draws the screen and all the components in it.
 */
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    String modMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies", TextFormatting.BOLD + modsMissing.getModName() + TextFormatting.RESET);
    this.drawCenteredString(this.fontRendererObj, modMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
    offset+=10;
    String fixMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies.fix", modsMissing.getModName());
    this.drawCenteredString(this.fontRendererObj, fixMissingDependenciesText, 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)
            {
                String message = String.format(TextFormatting.BOLD +  "%s " + TextFormatting.RESET + "%s", v.getLabel(), dav.getRange().toStringFriendly());
                this.drawCenteredString(this.fontRendererObj, message, 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;
    String seeLogText = I18n.format("fml.messages.mod.missing.dependencies.see.log", clientLog.getName());
    this.drawCenteredString(this.fontRendererObj, seeLogText, this.width / 2, offset, 0xFFFFFF);

    for (int i = 0; i < this.buttonList.size(); ++i)
    {
        this.buttonList.get(i).drawButton(this.mc, mouseX, mouseY);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:39,代码来源:GuiModsMissing.java


示例3: acceptVersion

import net.minecraftforge.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:F1r3w477,项目名称:CustomWorldGen,代码行数:10,代码来源:NetworkModHolder.java


示例4: APIContainer

import net.minecraftforge.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:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:ModAPIManager.java


示例5: onMiss

import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
private static void onMiss() {
	MissingModsException e = new MissingModsException(Sets.newHashSet(new DefaultArtifactVersion("5.0.0")),
			"BiomesOPlenty", "Biomes O' Plenty");
	RuntimeException ex = new RuntimeException("Could not find a premise mod: Biomes O' Plenty", e);
	JFXDialog.showThrowableAndWait(ex);
	throw ex;
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:8,代码来源:TransformerBiomesOPlenty.java


示例6: ModContainer

import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
/**
 * Initialize the mod
 */
public ModContainer() {
    super(meta = new ModMetadata());

    meta.authorList = Arrays.asList("cazzar");
    meta.description = "The core library for cazzar's mods";
    meta.modId = Reference.MOD_ID;
    meta.name = "Cazzar Core Lib";
    meta.dependants = Arrays.asList((ArtifactVersion) new DefaultArtifactVersion("jukeboxreloaded", true));
    meta.url = "http://www.cazzar.net/";
    meta.version = getVersionFromJar();
}
 
开发者ID:Cazzar,项目名称:CazzarCoreLib,代码行数:15,代码来源:ModContainer.java


示例7: processModsList

import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; //导入依赖的package包/类
public static void processModsList(Map<String, Object> json)
{
    for(ModVersionInfo info : registeredMods)
    {
        Map<String, String> versionInfo = (Map<String, String>)json.get(info.modName);
        if(versionInfo != null && versionInfo.containsKey(info.mcVersion))
        {
            ArtifactVersion current = new DefaultArtifactVersion(info.modVersion);

            String lat = versionInfo.get(info.mcVersion);
            ArtifactVersion latest = new DefaultArtifactVersion(lat);

            int diff = latest.compareTo(current);

            if(diff > 0)
            {
                info.modVersionNew = lat.trim();
                modsWithUpdates.add(info);
                if(requireLogging && !info.isModClientOnly)
                {
                    iChunUtil.LOGGER.info("[NEW UPDATE AVAILABLE] " + info.modName + " - " + info.modVersionNew);
                }
            }
        }
    }

    requireLogging = false;
    updatesChecked = true;
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:30,代码来源:UpdateChecker.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XSDateTime类代码示例发布时间:2022-05-23
下一篇:
Java TransactionGuard类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap