Jump to content

[1.7.10] [Not Solved] IntelliJ freaking out because of forge.


Recommended Posts

Posted

Ok, so as the title suggests, IntelliJ is freaking out because of forge... sort of.

 

Warning... Large Image:

 

 

2hA8DYF.png

 

 

 

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.

Posted

Well, it's still doing it:

MEbu3Sc.png

 

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.

 

Posted

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.

just you wait! ;)

Posted

What gradle tasks did you run to setup the IDEA workspeace?

 

I ran:

gradlew.bat genIntellijRuns

 

What jcranky told me to run. ;)

Posted

I don't know what's going on but this caught my eye:

bGXoKW9.png

 

It seems to have a problem with java imports especially. I don't know if that means anything.

Posted

And I found some guy with a mustash at the bottom. How did he get in there?

HoSNuH9.png

 

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

Posted

Ok, this is reeeaaallly off topic but I'm calling mustash man Stash. :D 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.

Posted

Well, I have to go to sleep. I'll leave Stash here to run the thread. And to talk to himself. lol

Posted

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.

Posted

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

 

Posted

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.

Posted

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.

Posted

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?

just you wait! ;)

Posted

I don't know what you guys are talking about. What is runClient?

Posted

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?

Posted

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!

Posted

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 =)

just you wait! ;)

Posted

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?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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