截图
介绍
介绍由机器翻译自 Modrinth 原页面,仅供参考。
Ducky Updater Lib

简介
用于检查模组是否有 Modrinth 更新的简易前置库
添加依赖
build.gradle.kts
repositories {
maven {
url = "https://api.modrinth.com/maven"
}
}
dependencies {
// Option 1: Include Ducky Updater to project for it available within your own jar (additional ~17kb)
include(modImplementation("maven.modrinth", "ducky-updater-lib", "<version>"))
// Option 2: Depend on Ducky Updater, but require that users install it manually
modImplementation("maven.modrinth", "ducky-updater-lib", "<version>")
}
fabric.mod.json
{
"depends": {
"fabricloader": "*",
...
// Also add dependency in your fabric.mod.json
"ducky-updater": "*"
}
}
用法
fabric.mod.json
{
"custom": {
...
"duckyupdater": {
//Mod modrinth ID from project page
"modrinthId": "mWxGwd3F",
// Optional (release, beta, alpha)
// Default: release
"type": "release",
// Optional (true, false)
// Default false
"featured": false
}
},
}
2023.7.1 之前
public class ModName implements ModInitializer {
@Override
public void onInitialize() {
DuckyUpdater.checkForUpdate(
"modrinthId",
"modId",
"alpha", // Optional! Default release
true // Optional! Default true
);
}
}
常见问题
Ducky Updater Lib 支持哪些 Minecraft 版本?
Ducky Updater Lib 支持 Minecraft Java 版 1.13–26.3,共 51 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Ducky Updater Lib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。
syorito-hatsuki 的其他作品
查看全部 →ModMenu Badges Lib
by syorito-hatsuki
更多徽章!!!
339.7万
7 个月前
Modrinth · CurseForge
Yet Another Cobblestone Generator
by Denfop, hasti19 等
灵活可自定义的发电机
3.1万
1 年前
Modrinth
Death Counter
by syorito-hatsuki
带客户端网页界面的死亡计数器
1.9万
9 个月前
Modrinth
Ducky Updater: ReWork
by syorito-hatsuki
使用 Modrinth API 更新模组的简易工具
1.4万
1 个月前
Modrinth
评论
登录后评论和评分