minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.49k stars 185 forks source link

Could not find net.minecraftforge:forge:1.15.2-31.1.1_mapped_stable_60-1.15. #679

Closed rcxwhiz closed 4 years ago

rcxwhiz commented 4 years ago

Minecraft Development plugin version: 2019.3-1.3.2 IntelliJ Ultimate version: 2019.3.2 Replicated on 2 windows machines and an arch linux machine

When I create a new project, the project is unable to build and is covered in red errors saying various symbols cannot be resolved. When I go to project structure There is a problem that comes up which says

Library Gradle: net.minecraftforge:forge:1.15.2-31.1.1_mapped_stable_60-1.15 has broken classes path:   C:\Users\josh-laptop\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\193.6015.39\jbr\bin\Could not find net.minecraftforge:forge:1.15.2-31.1.1_mapped_stable_60-1.15. [Fix]

I have navigated to the folder and sure enough net.monecraftforge:forge:1.15.2-31.1.1_mapped_stable_60-1.15. is not in it. I don't know if there's a way to manually download this file.

Things I have tried: Make a mod for 1.15.2 and 1.14.4 Invalidate caches / restart Uninstall/reinstall plugin Uninstall/reinstall IntelliJ Uninstall/reinstall JDK Used the following JDKs:

Here is my build.gradle:

buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
    }
}

apply plugin: 'net.minecraftforge.gradle'

version = modVersion
group = modGroup
archivesBaseName = modBaseName

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

minecraft {
    // The mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   Snapshot are built nightly.
    // stable_#            Stables are built at the discretion of the MCP team.
    // 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: '60-1.15'
    // 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
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            args '--mod', 'testmod', '--all', '--output', file('src/generated/resources/')

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }
    }
}

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.15.2-31.1.1'

}

I know there was an IntelliJ update recently. From what I've seen online I thought that the plugin and everything should be updated and fine.

I am very familiar with Python & C++, not as much with Java. I have made a simple mod before, but I would not call myself an expert.

DenWav commented 4 years ago

I'll need to double check that the MCP+Forge version logic is still correct.

oh-noey commented 4 years ago

I'm also having this issue, is there a simple way to correct this on the project side manually? I've never attempted to make something in the forge ecosystem before and was hoping to use this to accelerate setting up a dev environment.

rcxwhiz commented 4 years ago

I haven’t played around with it super extensively, but it seems like the gradle tasks are all still functional if you manually run them in the correct order, but going through the project structure settings pretty thoroughly I couldn’t get rid of all the errors in the editor. My guess is that you could somehow fix it by tweaking a gradle file, but I haven’t figured out how or why this happens. In the past I’ve had this extension just work perfectly but now I get this issue on every single computer I’ve tried installing it on.

On Mon, Jun 1, 2020 at 6:40 PM Dan notifications@github.com wrote:

I'm also having this issue, is there a simple way to correct this on the project side manually? I've never attempted to make something in the forge ecosystem before and was hoping to use this to accelerate setting up a dev environment.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/minecraft-dev/MinecraftDev/issues/679#issuecomment-637182511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALOISGZRXK3RQ7AJGX5YPILRUQ35VANCNFSM4KRUXTMA .

RedNesto commented 4 years ago

Probably happens because FG3 projects are generated with the wrong Gradle version, downgrading to 4.10.3 fixed it from the few tests I made.

CritickalGames commented 10 months ago

Spanish

Cuando descargas el MDK, tiene un nombre. En mi caso: forge-1.20.1-47.2.0-mdk Vos tienes que cambiar tienes que utilizar la versión de minecraft(en mi caso es la 1.20.1) y la versión de forge(en mi caso la 47.2.0) que dicen en el rar que descargaste.