Jump to content

Plugin [id: 'net.minecraftforge.gradle', version: '5.1.+'] was not found in any of the following sources:


wumpie

Recommended Posts

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' 
}

 

Link to comment
Share on other sites

Looks like you don't have forge's maven in your plugin repositories?

example from the mdk: https://github.com/MinecraftForge/MinecraftForge/blob/1.19.x/mdk/settings.gradle

  • Thanks 1

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.