写在前面: 可能会有高血压操作 请见谅
build.gradle
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { // Flywheel
url = "https://maven.tterrag.com/"
content {
// need to be specific here due to version overlaps
includeGroup("com.jozufozu.flywheel")
}
}
maven {
url = uri("https://maven.pkg.github.com/Cannoneers-of-Create/createbigcannons")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
url = uri("https://maven.pkg.github.com/Wagers-of-Industrial-Warfare/ritchiesprojectilelib")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven { url = "https://mvn.devos.one/#/" }
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
maven { url = "https://mvn.devos.one/snapshots/" }
// Create Fabric, Porting Lib, Forge Tags, Milk Lib, Registrate Fabric
maven { url = "https://cursemaven.com" } // Forge Config API Port
maven { url = "https://maven.cafeteria.dev/releases" } // Fake Player API
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM
maven { // Ritchie's Projectile Library
url = "https://maven.realrobotix.me/master/"
content {
includeGroup("com.rbasamoyai")
}
}
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
maven { url = "https://dvs1.progwml6.com/files/maven/" } // JEI
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://maven.tterrag.com/" } // Flywheel
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings(loom.layered {
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
})
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// create and create big cannons
modImplementation "com.rbasamoyai:createbigcannons-fabric-1.18.2:${project.createbigcannons_version}"
modImplementation "com.rbasamoyai:createbigcannons-common-1.18.2:${project.createbigcannons_version}"
modImplementation "com.simibubi.create:create-fabric-1.18.2:${project.create_version}"
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current()
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
复制代码# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version = 1.18.2
yarn_mappings = 1.18.2+build.4
loader_version = 0.14.24
# Mod Properties
mod_version = 1.0.0
maven_group = org.jawbts
archives_base_name = bigcannonsfix
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version = 0.76.0+1.18.2
createbigcannons_version = 0.5.3-nightly-e05738f
create_version = 0.5.1-c-build.1127+mc1.18.2
# Mappings
# https://lambdaurora.dev/tools/import_quilt.html
qm_version = 26
# https://parchmentmc.org/docs/getting-started
parchment_version = 2022.11.06
在使用模组 https://github.com/Cannoneers-of-Create/CreateBigCannons 提供的库 https://github.com/Cannoneers-of ... 5.3-nightly-e05738f 与 https://github.com/Cannoneers-of ... 5.3-nightly-e05738f
时出现了如下问题


build.gradle
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { // Flywheel
url = "https://maven.tterrag.com/"
content {
// need to be specific here due to version overlaps
includeGroup("com.jozufozu.flywheel")
}
}
maven {
url = uri("https://maven.pkg.github.com/Cannoneers-of-Create/createbigcannons")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
url = uri("https://maven.pkg.github.com/Wagers-of-Industrial-Warfare/ritchiesprojectilelib")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven { url = "https://mvn.devos.one/#/" }
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
maven { url = "https://mvn.devos.one/snapshots/" }
// Create Fabric, Porting Lib, Forge Tags, Milk Lib, Registrate Fabric
maven { url = "https://cursemaven.com" } // Forge Config API Port
maven { url = "https://maven.cafeteria.dev/releases" } // Fake Player API
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM
maven { // Ritchie's Projectile Library
url = "https://maven.realrobotix.me/master/"
content {
includeGroup("com.rbasamoyai")
}
}
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
maven { url = "https://dvs1.progwml6.com/files/maven/" } // JEI
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://maven.tterrag.com/" } // Flywheel
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings(loom.layered {
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
})
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// create and create big cannons
modImplementation "com.rbasamoyai:createbigcannons-fabric-1.18.2:${project.createbigcannons_version}"
modImplementation "com.rbasamoyai:createbigcannons-common-1.18.2:${project.createbigcannons_version}"
modImplementation "com.simibubi.create:create-fabric-1.18.2:${project.create_version}"
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current()
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
复制代码# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version = 1.18.2
yarn_mappings = 1.18.2+build.4
loader_version = 0.14.24
# Mod Properties
mod_version = 1.0.0
maven_group = org.jawbts
archives_base_name = bigcannonsfix
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version = 0.76.0+1.18.2
createbigcannons_version = 0.5.3-nightly-e05738f
create_version = 0.5.1-c-build.1127+mc1.18.2
# Mappings
# https://lambdaurora.dev/tools/import_quilt.html
qm_version = 26
# https://parchmentmc.org/docs/getting-started
parchment_version = 2022.11.06
在使用模组 https://github.com/Cannoneers-of-Create/CreateBigCannons 提供的库 https://github.com/Cannoneers-of ... 5.3-nightly-e05738f 与 https://github.com/Cannoneers-of ... 5.3-nightly-e05738f
时出现了如下问题

