Closed SkyIce0229 closed 2 years ago
This is my build.gradle
buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } mavenCentral() maven { // location of the maven that hosts JEI files name = "Progwml6 maven" url = "https://dvs1.progwml6.com/files/maven/" } maven { // location of a maven mirror for JEI files, as a fallback name = "ModMaven" url = "https://modmaven.k-4u.nl" } } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true } }
apply plugin: 'net.minecraftforge.gradle'
group = 'Mind' version = '0.0.1' archivesBaseName = 'mind'
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
minecraft { // The mappings can be changed at any time, and must be in the following format. // Channel: Version: // snapshot YYYYMMDD Snapshot are built nightly. // stable # Stables are built at the discretion of the MCP team. // official MCVersion Official field/method names from Mojang mapping files // // You must be aware of the Mojang license when using the 'official' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Use non-default mappings at your own risk. they may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: 'stable', version: '39-1.12' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
// The markers can be changed as needed.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'
// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
mods {
mind {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
// The markers can be changed as needed.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'
// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
mods {
mind {
source sourceSets.main
}
}
}
}
}
// Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's 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.12.2-14.23.5.2855'
// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
}
// Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ "Specification-Title" : "mind", //"Specification-Vendor": "mind authors", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.version, //"Implementation-Vendor": "mind authors", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } }
jar.finalizedBy('reobfJar')
change the dash to an underscore
You have
compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
but need to use an underscore not a dash. the setup instructions for 1.12 are documented in the wiki here: https://github.com/mezz/JustEnoughItems/wiki/Getting-Started
deobfProvided "mezz.jei:jei_${mc_version}:${jei_version}:api"
runtime "mezz.jei:jei_${mc_version}:${jei_version}"
I am a new developer. After building.gradle according to the problems of Wiki and other developers, I found that it reported errors. Is it my copy error or other reasons
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find mezz.jei:jei-1.12.2:4.16.1.302.
Could not find mezz.jei:jei-1.12.2:4.16.1.302_mapped_stable_39-1.12. Required by: project :
Could not find mezz.jei:jei-1.12.2:4.16.1.302_mapped_stable_39-1.12. Searched in the following locations: