I am trying to make a mc mod for the first time, but im getting this error whenever i run " gradlew genIntelliJRuns "
Here is the full output of my console:
C:\Users\redacted\Documents\first-mod>gradlew genIntelliJRuns
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Artyom\Documents\first-mod\build.gradle' line: 4
* What went wrong:
Plugin [id: 'net.minecraftforge.gradle', version: '5.1'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'net.minecraftforge.gradle:net.minecraftforge.gradle.gradle.plugin:5.1')
Searched in the following repositories:
Gradle Central Plugin Repository
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
and here is my build.gradle file:
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
}
version = '1.0'
group = 'io.github.artyomkulimov.firstmod'
archivesBaseName = 'firstmod'
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.19.2'
runs {
client {
workingDirectory project.file('run')
mods {
firstmod {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
mods {
firstmod {
source sourceSets.main
}
}
}
gameTestServer {
workingDirectory project.file('run')
mods {
firstmod {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
args '--mod', archivesBaseName, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
firstmod {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
}
dependencies {
minecraft 'net.minecraftforge:forge:1.19.2-43.1.1'
}
jar {
manifest {
attributes([
"Specification-Title" : "First Mod",
"Specification-Vendor" : "wumpie",
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "wumpie",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
jar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}