Jump to content

Recommended Posts

Posted

Hi! Im currently having troubles with my own mod. Does someone here knows how to fix it? 

Error code: 

> Task :reobfJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reobfJar'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.minecraftforge:forge:1.16.5-36.2.42_mapped_official_1.16.5.
     Searched in the following locations:
       - file:/C:/Users/1mpla/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.2.42_mapped_official_1.16.5/forge-1.16.5-36.2.42_mapped_official_1.16.5.pom
       - file:/C:/Users/1mpla/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.2.42_mapped_official_1.16.5/forge-1.16.5-36.2.42_mapped_official_1.16.5.jar
     Required by:
         project :

* 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 33s
5 actionable tasks: 2 executed, 3 up-to-date

 

 

 

 

Code: 

buildscript {

    repositories {

        maven { url = 'https://maven.minecraftforge.net' }

        maven { url = 'https://forums.minecraftforge.net' }

        maven { url = 'https://files.minecraftforge.net/net/minecraftforge/forge/' }

        mavenCentral()

    }

    dependencies {

        classpath 'net.minecraftforge.gradle:ForgeGradle:6.0.+' // Update to the latest compatible version

    }

}

 

apply plugin: 'net.minecraftforge.gradle'

 

group = 'com.autocommandmod'

version = '1.0.0'

 

java {

    toolchain.languageVersion.set(JavaLanguageVersion.of(8))

    sourceCompatibility = JavaVersion.VERSION_1_8

    targetCompatibility = JavaVersion.VERSION_1_8

}

 

tasks.named("jar") {

    archiveBaseName.set('autocommandmod')

}

 

minecraft {

    mappings channel: 'official', version: '1.16.5'

    runs {

        client {

            workingDirectory project.file('run')

            args '--username', 'Dev'

        }

    }

}

 

repositories {

    maven { url = 'https://maven.minecraftforge.net' }

    mavenCentral()

}

 

dependencies {

    minecraft 'net.minecraftforge:forge:1.16.5-36.2.42'

}

 

tasks.withType(JavaCompile) {

    options.encoding = 'UTF-8'

}

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.