Jump to content

Recommended Posts

Posted

Hi guys,

 

So I'm confused as anything to what's going on as I've copied exactly what the example mod is doing.

 

I'm using Intellij Idea 15 Ultimate as my chosen IDE as it's free to me as a student and Eclipse is being stupid... Anyway, I've set up the Forge workspace up properly (of which I'm using 1.8.9-11.15.1.1722) and have my project exactly the same as the example mod (as previously said) but to clarify I've got:

 

Java -| <-- Set as Sources Root and this works fine as the mod shows in minecraft.

          |

          |--- com.jamierhys.comtech.main <-- where my main class is

 

Resources -| <-- Set as Resources Root but this is not working

                    |

                    |--- mcmod.info

 

As you can see, it's identical to what the example mod is but when I launch minecraft and click "mods", although the mod shows up correctly, it comes up with:

 

ComTech Mod
Version: 1.8.9-0.0.1
Mod State: Available

No mod information found
Ask your mod author to provide a mod mcmod.info file

 

And cannot figure out what's going on as this is the first time using Idea...

 

Anyone have any ideas? (Pun not intended)

Posted

I don't know IntelliJ, but I do know that the stock gradle.build file has some lines in it about ignoring mcmod.info. You might look at that and then post in the Gradle child forum if you want to change it.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

The:

idea { module { inheritOutputDirs = true; } }

 

If so, I did do that as I actually followed his tutorial to set it up in the first place.

 

Also, I have the directory set as a git repo... Could that be an issue?

Posted

Turns out the Git repo isn't actually causing an issue as the mcmod.info still isnt being shown.

 

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

Squirrel ! Squirrel ! Squirrel !

Posted

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

 

Re-synchronise... That's where I click the circular arrow icon in the gradle tab isn't it? If so I've pressed that every time I've done a task in the tutorial.

 

I've also run genIntellijRuns task every time the tutorial has stated too.

Posted

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

 

Re-synchronise... That's where I click the circular arrow icon in the gradle tab isn't it? If so I've pressed that every time I've done a task in the tutorial.

 

I've also run genIntellijRuns task every time the tutorial has stated too.

 

Well, I'm sorry, I don't know what to say. Here is a screen of my config if this can help you :

 

1456178497-config.png

 

However, do you have the same processResources as me in the build.gradle file ?

 

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

 

Finally, when you build a jar, I suppose your mcmod.info is not there ... ?

 

EDIT : using Intellij IDEA 15.0.3, build #IU-143.1821 for educational use only !

 

EDIT2 : the way I proceeded to make an Intellij Forge project is the following :

  • Get the forge files and put them in a folder
  • Run ./gradlew setupDecompWorkspace from console
  • Import project from Intellij using their gradle version and the build.gradle file
  • Add idea { module { inheritOutputDirs = true; } } to the build.gradle file without syncing
  • Run genIntellijRuns task from Intellij, it will normally ask you to reopen project, do it

 

May it helps you :)

Squirrel ! Squirrel ! Squirrel !

Posted

The

idea { module { inheritOutputDirs = true; } }

line hasn't been required since this commit in ForgeGradle 2.0.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • 4 years later...
Posted (edited)
On 2/22/2016 at 3:49 AM, jeffryfisher said:

I don't know IntelliJ, but I do know that the stock gradle.build file has some lines in it about ignoring mcmod.info. You might look at that and then post in the Gradle child forum if you want to change it.

If you are using Intellij 14 (which you should) you need to add the following to the end of your build.gradle before importing:

 

sourceSets { main { output.resourcesDir = output.classesDir } }
 

 

If you don't do that, your assets will not work. (Thanks to Cazzar for this solution)

Edited by hhyygg
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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