Jump to content

Build.gradle just started not working out of nowhere


Recommended Posts

Posted

Making a 1.16.5 mod with IntelliJ. Build.Gradle file started not working Will paste the file with the subsequent error after.

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net' }
        mavenCentral()
        maven { url 'https://libraries.minecraft.net/' }
        maven { url 'https://repo.maven.apache.org/maven2' }
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
    }
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0-1.16.5'
group = 'com.johake.myranium'

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))

minecraft {
    mappings channel: 'snapshot', version: '20210309-1.16.5'

    runs {
        client {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'
            mods {
                myranium {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'
            mods {
                myranium {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'
            args '--mod', 'myranium', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
            mods {
                myranium {
                    source sourceSets.main
                }
            }
        }
    }
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
    minecraft 'net.minecraftforge:forge:1.16.5-36.1.0'
    implementation 'net.minecraftforge.fml:common:3.2.1'
    implementation 'net.minecraftforge.fml:network:2.5.1'
}

jar {
    manifest {
        attributes([
                "Specification-Title": "myranium",
                "Specification-Vendor": "myraniumareus",
                "Specification-Version": "1",
                "Implementation-Title": project.name,
                "Implementation-Version": "${version}",
                "Implementation-Vendor" :"myraniumareus",
                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

jar.finalizedBy('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
            maven { url = 'https://maven.minecraftforge.net' }
            mavenCentral()
            maven { url = 'https://libraries.minecraft.net/' }
            maven { url = 'https://files.minecraftforge.net/maven' }
        }
    }
}

Error I'm getting:

Could not resolve all files for configuration ':runtimeClasspathCopy'.
> Could not find net.minecraftforge.fml:common:3.2.1.
  Searched in the following locations:
    - https://maven.minecraftforge.net/net/minecraftforge/fml/common/3.2.1/common-3.2.1.module
    - https://maven.minecraftforge.net/net/minecraftforge/fml/common/3.2.1/common-3.2.1.pom
    - https://maven.minecraftforge.net/net/minecraftforge/fml/common/3.2.1/common-3.2.1.jar
    - https://libraries.minecraft.net/net/minecraftforge/fml/common/3.2.1/common-3.2.1.jar
    - https://repo.maven.apache.org/maven2/net/minecraftforge/fml/common/3.2.1/common-3.2.1.pom
  Required by:
      project :
> Could not find net.minecraftforge.fml:network:2.5.1.
  Searched in the following locations:
    - https://maven.minecraftforge.net/net/minecraftforge/fml/network/2.5.1/network-2.5.1.module
    - https://maven.minecraftforge.net/net/minecraftforge/fml/network/2.5.1/network-2.5.1.pom
    - https://maven.minecraftforge.net/net/minecraftforge/fml/network/2.5.1/network-2.5.1.jar
    - https://libraries.minecraft.net/net/minecraftforge/fml/network/2.5.1/network-2.5.1.jar
    - https://repo.maven.apache.org/maven2/net/minecraftforge/fml/network/2.5.1/network-2.5.1.pom
  Required by:
      project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Help appreciated

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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