首次提交 AutoDig Mod
这个提交包含在:
+57
@@ -0,0 +1,57 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.17.19'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
// 用于把 Baritone 原样打包进模组 jar 的资源(不放默认依赖里,避免 Gradle 误解析)
|
||||
configurations {
|
||||
nestedJar
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Minecraft
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Fabric API
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
// Baritone API (local jar, compile only)
|
||||
modImplementation files("libs/baritone-api-fabric-1.13.1.jar")
|
||||
|
||||
// 标记需要嵌套打包的 jar
|
||||
nestedJar files("libs/baritone-api-fabric-1.13.1.jar")
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
filteringCharset "UTF-8"
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
|
||||
// 将 Baritone 嵌套打包进 META-INF/jars,匹配 fabric.mod.json 的 jars 声明,
|
||||
// 使玩家无需单独安装 baritone 依赖即可运行
|
||||
from(configurations.nestedJar) {
|
||||
into "META-INF/jars"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户