Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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.

 

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

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

 

I ran:

gradlew.bat genIntellijRuns

 

What jcranky told me to run. ;)

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.

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

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.

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

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.

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

 

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.

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.

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

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

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?

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!

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

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?

Should I re-import (again)?

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.