MinecraftForge / FML

(Archive Only: Merged into Forge proper) The Forge Mod Loader - an opensource replacement mod loader for minecraft
Other
433 stars 200 forks source link

ask your author to provide a mcmod.info file #640

Open Riprock opened 9 years ago

Riprock commented 9 years ago

When I made my mcmod.info file i put it in /src/main/resources and named it mcmod.info Everything is done correctly and i used a sample mcmod.info file and edited it for my mod. When i launch mc it say ask the mod author for a mcmod.info file. I dont know what is wrong

Note:Im using intellij Idea

Cazzar commented 9 years ago

I'm going to guess IDEA 14, if so add this to build.gradle: idea { module { inheritOutputDirs = true } }

On Fri, 17 Apr 2015 1:57 am ewm2000 notifications@github.com wrote:

When I made my mcmod.info file i put it in /src/main/resources and named it mcmod.info Everything is done correctly and i used a sample mcmod.info file and edited it for my mod. When i launch mc it say ask the mod author for a mcmod.info file. I dont know what is wrong

Note:Im using intellij Idea

— Reply to this email directly or view it on GitHub https://github.com/MinecraftForge/FML/issues/640.

Riprock commented 9 years ago

cazzar what line do i put this on or where do i put it in the build.gradle file

diesieben07 commented 9 years ago

Just at the end of the file.

Riprock commented 9 years ago

File name or in the code?

diesieben07 commented 9 years ago

In the build.gradle.

Riprock commented 9 years ago

is it a process resource?

AbrarSyed commented 9 years ago

Just take this snippet: idea { module { inheritOutputDirs = true } } And paste it at the bottom of your build.gradle file. Do NOT put it inside ANY {} blocks.

Riprock commented 9 years ago

I undertand that but would it go under process resources like this?

processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
    include 'mcmod.info'

    // replace version and mcversion
    expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
    exclude 'mcmod.info'
}
idea { module {
    inheritOutputDirs = true } }

}

Riprock commented 9 years ago

or

processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
    include 'mcmod.info'

    // replace version and mcversion
    expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
    exclude 'mcmod.info'
}

} idea { module { inheritOutputDirs = true } }

like this outside of the project resources

AbrarSyed commented 9 years ago

as I said. Do NOT put it inside ANY {} blocks.

that means DO NOT put it in the processResources{} block.

Riprock commented 9 years ago

I did that and checked over my mcmod.info and everything matches but it doesnt load. It still says ask the author for the mcmod.info. I did notice this if it is relevant: [15:38:47] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, WineMod] at CLIENT [15:38:47] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, WineMod] at SERVER

Also you can go through my code to see if i messed up anywhere else https://github.com/ewm2000/Wine-Mod

AbrarSyed commented 9 years ago

You also need to ensure that the modid specified in your @mod matches the modid specified in the mcmod.info file. You may also have to refresh IDEA to ensure that the changes to your build.gradle have taken affect.

Riprock commented 9 years ago

Just Checked the @mod and refreshed everything but for some reason it still doesn't recognize the mcmod.info file. What is wrong?

Zyfarok commented 9 years ago

For me everything is OK with Intellij IDEA. I think you did not import the project correctly. You can try to close Intellij IDEA and delete everything but :

And then you do : gradlew setupDecompWorkspace --refresh-dependencies gradlew idea

And then you import your project on IDEA from the .iml file or the .ipr (= IntelliJ IDEA Project File) DO NOT IMPORT FROM THE BUILD.GRADLE !

(And finally you can do "gradlew gIR" to be able to run Minecraft from the IDE if you want it)

It works for me (but I have multiple mods (modules) in my workspace so I import the .iml and I create the run configuration manually)