Guest Posted March 22, 2015 Posted March 22, 2015 Ok, so as the title suggests, IntelliJ is freaking out because of forge... sort of. Warning... Large Image: It has A BUNCH of errors, apparently because it want an SDK? I have no idea. I recently installed IntelliJ and it had errors, like it wouldn't run at all. But some people helped me fix them. But now there is errors again as you can see from the picture. Now, in case you ask, I did run the command to setup my mod with IntelliJ. Any help is appreciated. Quote
jcranky Posted March 23, 2015 Posted March 23, 2015 Try re-importing the project. Quote just you wait!
Guest Posted March 23, 2015 Posted March 23, 2015 Well, it's still doing it: But I don't think it's done yet. Edit: It's done, still doing it. But I think that the yellow text in the bottom may hold a clue. Quote
jcranky Posted March 23, 2015 Posted March 23, 2015 The import takes a while, that's normal and is not a problem because you usually don't have to do it all the time. About the unindexed repository, that is not a problem, but you can follow IDEA's instructions and do the indexing to remove the warnings. Quote just you wait!
shadowfacts Posted March 23, 2015 Posted March 23, 2015 What gradle tasks did you run to setup the IDEA workspeace? Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
Guest Posted March 23, 2015 Posted March 23, 2015 What gradle tasks did you run to setup the IDEA workspeace? I ran: gradlew.bat genIntellijRuns What jcranky told me to run. Quote
Guest Posted March 23, 2015 Posted March 23, 2015 I don't know what's going on but this caught my eye: It seems to have a problem with java imports especially. I don't know if that means anything. Quote
Guest Posted March 23, 2015 Posted March 23, 2015 And I found some guy with a mustash at the bottom. How did he get in there? Edit: He shall be the mascot in my coding team! (The team that only includes me) Edit on that Edit: I'm talking to myself, on a forum. How awesome. lol Quote
Guest Posted March 23, 2015 Posted March 23, 2015 Ok, this is reeeaaallly off topic but I'm calling mustash man Stash. Coding can really get to a person (make you go craaaazy) so Stash is now my comic relief. It's ok, I'm not going insane... yet. Quote
Guest Posted March 23, 2015 Posted March 23, 2015 Well, I have to go to sleep. I'll leave Stash here to run the thread. And to talk to himself. lol Quote
Guest Posted March 23, 2015 Posted March 23, 2015 I haven't gone to sleep yet, and this is still veeery of topic. But I just learned on Twitter (https://twitter.com/AwesomeSpider8/status/579897391765176320) that his name is Hector the inspector. But I'm content with calling him Stash. Why? 'Cause it's a funnier name. At any rate, hopefully he'll keep me from going insane because of errors. What? Don't errors make you want to rip your hair out too? Then when you learn how to do it properly you facepalm and then laugh about it. Oh my, you know your tired when you have an unusual sense of humor. Quote
TheGreyGhost Posted March 23, 2015 Posted March 23, 2015 Dude! Less Mountain Dew, more Sleep Yes setting the Project SDK is very important and nothing will work without it. Did you fix it yet? For some reason, I've found I need to use the following method to import projects correctly with IntelliJ, I'm not sure why. If you're still having no luck, you might try this: 1) From the command line in your project's directory containing the build.gradle file, run gradlew setupDecompWorkspace to install Forge and configure the project, this will take quite some time, maybe 20 minutes or more. 2) From the command line, run gradlew idea 3) Open the project (open the MinecraftByExample.ipr file, not the gradle file). 4) It will ask you whether you want to import the "unlinked gradle project". Choose yes. 5) Run the gradle task 'getIntellijRuns' afterwards to get the Run and Debug configurations. Note- if you are copying the code to your own project, don't forget to add this line to the end of your build.gradle file, otherwise your assets won't work (see here): sourceSets { main { output.resourcesDir = output.classesDir } } -TGG Quote
Guest Posted March 23, 2015 Posted March 23, 2015 Hey! How did you know I was drinking Mountain Dew last night? lol No I haven't fixed it yet. I'll try what you said. Quote
Guest Posted March 23, 2015 Posted March 23, 2015 Ok, that was weird. I finished importing the SDK. I hope I did it right (point it to an jdk, right?) but anyways I went on this forum again and a weird checkmark symbol appeared on intelliJ's icon. Then some of the errors cleared up. Hmm... Edit: And apparently it changed a bit of my code. Luckily I have a backup. Quote
jcranky Posted March 23, 2015 Posted March 23, 2015 Note- if you are copying the code to your own project, don't forget to add this line to the end of your build.gradle file, otherwise your assets won't work (see here): sourceSets { main { output.resourcesDir = output.classesDir } } On that note, didn't this break running from console? Quote just you wait!
Guest Posted March 23, 2015 Posted March 23, 2015 I don't know what you guys are talking about. What is runClient? Quote
Guest Posted March 23, 2015 Posted March 23, 2015 Huh. How do you know all this stuff? It seems like every time I have a question about how Forge works you can answer it. Have been studying code for years or something? Quote
Guest Posted March 23, 2015 Posted March 23, 2015 So, I did what you said Ghost, minus the sourceSets thing (I don't exactly know what that does) and everything seems to working properly. Thanks everyone! Quote
jcranky Posted March 23, 2015 Posted March 23, 2015 Yes, it breaks runClient (apparently, I did not know that before), but if you are using an IDE I don't see why you would use runClient anyways. Yep, it is just good to know, in case you need it =) Quote just you wait!
Guest Posted March 23, 2015 Posted March 23, 2015 Well, now it isn't solved anymore. I added the source set thing (I don't know what to call it, ok?) and it did its thing. Then out of nowhere all the references in my code to any class of Forge or Minecraft went red. I checked the "External Libraries" at the bottom and it has a file called "start" and a file called "< 1.8 >". I think 1.8 is the Java JDK. But the forge jar is gone. Any help? Quote
Recommended Posts
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.