Jump to content

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


Awesome_Spider

Recommended Posts

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.

Link to comment
Share on other sites

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! ;)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! ;)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.