net.minecraftforge.fml.common.Mod.version()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中net.minecraftforge.fml.common.Mod.version()方法的一些代码示例,展示了Mod.version()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mod.version()方法的具体详情如下:
包路径:net.minecraftforge.fml.common.Mod
类名称:Mod
方法名:version

Mod.version介绍

暂无

代码示例

代码示例来源:origin: EngineHub/WorldEdit

/**
 * Get the version of the WorldEdit-for-Forge implementation.
 *
 * @return a version string
 */
String getInternalVersion() {
  return ForgeWorldEdit.class.getAnnotation(Mod.class).version();
}

代码示例来源:origin: RS485/LogisticsPipes

@Override
public String getVersion() {
  return LogisticsPipes.class.getAnnotation(Mod.class).version();
}

代码示例来源:origin: lucko/spark

@Override
public String getVersion() {
  return SparkForgeMod.class.getAnnotation(Mod.class).version();
}

代码示例来源:origin: RS485/LogisticsPipes

@Override
  public void executeCommand(ICommandSender sender, String[] args) {
    sender.sendMessage(new TextComponentString(String.format("LogisticsPipes %s for Minecraft %s.", LogisticsPipes.class.getAnnotation(Mod.class).version(), LPConstants.MCVersion)));

    VersionChecker versionChecker = LogisticsPipes.versionChecker;
    sender.sendMessage(new TextComponentString(versionChecker.getVersionCheckerStatus()));

    if (versionChecker.isVersionCheckDone() && versionChecker.getVersionInfo().isNewVersionAvailable()) {
      sender.sendMessage(new TextComponentString("Use \"/logisticspipes changelog\" to see a changelog."));
    }
  }
}

相关文章