11import com.google.common.collect.ImmutableList
22import com.google.common.collect.ImmutableMap
3- import net.fabricmc.loom.util.Platform
43import org.objectweb.asm.ClassReader
54import org.objectweb.asm.ClassWriter
65import org.objectweb.asm.tree.ClassNode
@@ -124,7 +123,7 @@ def mod_dependencies = [
124123 [(mcVersion > 12004 ? " curse.maven:carpet-349239" : " maven.modrinth:carpet" ), " carpet" , 1 ],
125124 [" net.kyrptonaught:kyrptconfig" , " kyrptconfig" , 1 ],
126125 [" net.kyrptonaught:shulkerutils" , " shulkerutils" , mcVersion > 12004 ? 0 : 1 ],
127- [getSbYacl (), " yacl" , mcVersion >= 12001 ? 1 : 0 ],
126+ [getYacl (), " yacl" , mcVersion >= 12001 ? 1 : 0 ],
128127 [" maven.modrinth:chest-tracker" , " chesttracker" , mcVersion < 12105 ? 1 : 4 ], // TODO 箱子追踪未更新21.5
129128 [" maven.modrinth:where-is-it" , " whereisit" , mcVersion < 12105 ? 1 : 4 ],
130129 [" red.jackf.jackfredlib:jackfredlib" , " jackfredlib" , mcVersion >= 12001 ? 1 : 0 ],
@@ -135,10 +134,9 @@ def mod_dependencies = [
135134 [" io.github.cottonmc:LibGui" , " LibGui" , mcVersion < 12001 ? 1 : 0 ],
136135]
137136
138- String getSbYacl () {
137+ String getYacl () {
139138// return "maven.modrinth:yacl";
140139 return mcVersion == 12002 ? " maven.modrinth:yacl" : " dev.isxander:yet-another-config-lib" ;
141- // return"maven.modrinth:yacl";
142140}
143141
144142String getQuiShulkerBox () {
@@ -281,76 +279,6 @@ loom {
281279 }
282280}
283281
284- // tasks.register("serverPropertiesJar", Jar) {
285- // File propsFile = file("build/tmp/install.properties")
286- //
287- // doFirst {
288- // if (propsFile.exists()) {
289- // propsFile.delete()
290- // }
291- //
292- // BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(propsFile))
293- // bufferedWriter.writeLine("fabric-loader-version=${project.loader_version}")
294- // bufferedWriter.writeLine("game-version=${project.minecraft_version}")
295- // bufferedWriter.close()
296- // }
297- //
298- // archiveFileName.set("server-properties.jar")
299- // destinationDirectory.set(file("build/tmp"))
300- // from(propsFile)
301- // }
302-
303- // tasks.register("runProductionClient", JavaExec) {
304- // dependsOn(tasks.remapJar)
305- // classpath.from(configurations.productionRuntimeClient)
306- // mainClass.set("net.fabricmc.loader.impl.launch.knot.KnotClient")
307- // workingDir(file("run/client"))
308- //
309- // doFirst {
310- // classpath.from(loom.minecraftProvider.minecraftClientJar)
311- // args(
312- // "--assetIndex", loom.minecraftProvider.versionInfo.assetIndex().fabricId(loom.minecraftProvider.minecraftVersion()),
313- // "--assetsDir", file("${loom.files.userCache}/assets").absolutePath,
314- // "--gameDir", workingDir.absolutePath,
315- // "--width", "1280",
316- // "--height", "720",
317- // )
318- // jvmArgs("-Dmixin.debug.export=true")
319- // jvmArgs("-Dfabric.addMods=${configurations.productionRuntimeMods.files.join(File.pathSeparator)}${File.pathSeparator}${tasks.remapJar.archiveFile.get().asFile.absolutePath}")
320- //
321- //
322- // if (Platform.CURRENT.operatingSystem.isMacOS()) {
323- // jvmArgs("-XstartOnFirstThread")
324- // }
325- // }
326- // }
327-
328- // tasks.register("runProductionServer", JavaExec) {
329- // dependsOn(tasks.remapJar)
330- // classpath.from(configurations.productionRuntimeServer, tasks.named("serverPropertiesJar"))
331- // mainClass.set("net.fabricmc.installer.ServerLauncher")
332- // workingDir(file("run/server"))
333- //
334- // doFirst {
335- // args("nogui")
336- // jvmArgs("-Dmixin.debug.export=true")
337- // jvmArgs("-Dfabric.addMods=${configurations.productionRuntimeMods.files.join(File.pathSeparator)}${File.pathSeparator}${tasks.remapJar.archiveFile.get().asFile.absolutePath}")
338- // }
339- // }
340-
341- // ["serverPropertiesJar",
342- // "runClient", "runServer",
343- // "runMixinAuditClient", "runMixinAuditServer",
344- // "runProductionClient", "runProductionServer",
345- // "preprocessCode", "preprocessResources",
346- // "preprocessTestCode", "preprocessTestResources"].forEach {
347- // if (tasks.getNames().contains(it)) {
348- // tasks.named(it) {
349- // it.group("${mod_id}")
350- // }
351- // }
352- // }
353-
354282tasks. withType(JavaCompile ). configureEach {
355283 options. encoding(" UTF-8" )
356284}
0 commit comments