代码拉取完成,页面将自动刷新
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://maven.parchmentmc.org' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath fileTree(dir: 'libs', include: '*.jar')
classpath 'org.parchmentmc:librarian:1.+'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
mixin {
add sourceSets.main, 'xc_crop.refmap.json'
}
version = project.mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'official', version: '1.18.2'
runs {
client {
workingDirectory project.file('run')
args '-mixin.debug=true', '-mixin.debug.export=true', '-mixin.config=xc_crop.mixins.json'
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'xc_crop'
mods {
xc_crop {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
arg '-mixin.config=xc_crop.mixins.json'
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'xc_crop'
mods {
xc_crop {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
xc_crop {
source sourceSets.main
}
}
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
mavenLocal()
maven {
name 'IzzelAliz Maven'
url 'https://maven.izzel.io/releases/'
}
maven {
url 'https://maven.theillusivec4.top'
}
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
implementation fg.deobf("curse.maven:farmers-delight-398521:3834150")
//implementation fg.deobf("curse.maven:appleskin-248787:3686482")
//implementation fg.deobf("curse.maven:jei-238222:3885885")
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
//annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
// compile against the JEI API but do not include it at runtime
//compileOnly fg.deobf("curse.maven:FAR-398521:3834150")
//runtimeOnly fg.deobf("curse.maven:FAR-398521:3834150")
//runtimeOnly fg.deobf("blank:xc_material_1.18.2:xc_material-1.0")
// Real mod deobf dependency examples - these get remapped to your current mappings
//compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
//runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
// Examples using mod jars from ./libs
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
"Specification-Title" : project.mod_id,
"Specification-Vendor" : project.mod_author,
"Specification-Version" : "1",
"Implementation-Title" : project.mod_id,
"Implementation-Version" : project.mod_version,
"Implementation-Vendor" : project.mod_author,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : 'xc_crop.mixins.json'
])
}
}
// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。