Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Using Intellij IDEA for Mod-Development with ForgeGradle


Recommended Posts

  • 4 weeks later...

So, while trying to do this for my own development setup (prefering IntelliJ over Eclipse) when importing the mod IntelliJ responds 'The target server failed to respond'. I am using IntelliJ version 15.0.4

 

EDIT: So, either the problem was using import instead of open, or it was my internet connection...

Link to comment
Share on other sites

Okay, I've tried "gradlew --refresh-dependencies" "gradlew clean" and then run the setup again, I've tried doing the invalidate and restart option, and I can't figure out what I've done wrong. Minecraft does not compile or run.

 

 

It doesn't use imports and can't resolve things, and it says "Class 'Main' is never used".

 

Did I do setup wrong or something?

 

 

Link to comment
Share on other sites

I'm trying to get the MDK to working IntelliJ but are hitting some problems. Would appreciate some help.

 

When I try to import the build.grade file into IntelliJ I get the message "Cannot import, Cannot import anything from /path/to/build.gradle". I tried it in a couple of different ways, selecting import from the IntelliJ start screen and also selecting File > New > Project From Existing sources... IntelliJ will just directly give me the message without any dialogs. All I get is the message and an OK button.

 

EDIT:

 

I have tried with both IntelliJ 14 Community Edition and IntelliJ 15 CE.

 

EDIT2:

 

Never mind, I found the reason :-). I originally setup IntelliJ for use with Clojure so I did not include all the tools and plug-ins. So the gradle plugin was not installed. I cleaned out all settings for IntelliJ, restarted and selected all tools and plug-ins and now it can open the gradle.build file!

Link to comment
Share on other sites

For some reason lately on any version of forge, I get everything set up but when I run the game on either server or client, I get this error:

 

"C:\Program Files\Java\jdk1.8.0_73\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_73\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain GradleStart
Exception in thread "main" java.lang.ClassNotFoundException: GradleStart
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)

Process finished with exit code 1

 

Also, the Client and Server tabs are Xed out. What does that mean?

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

So, I followed your tutorial step by step, but got stuck in before launching the client from IntelliJ idea. As you suggested, I opened cmd in folder with forge and run gradlew setupDecompWorkspace --refresh-dependencies

 

This unfortunatelly end up stuck at 91 percent, and build failed. I was able to find out that one of the addresses requested timed-out (when I tried it in the browser, it loaded okay, it's this one: https://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom), and then I found out, that the other address returns forbidden - which is most likely obstacle that my current installation won't overcome, it's this one: https://libraries.minecraft.net/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom).

 

Do you have any thoughts on how to fix this? Thanks in advance for any help provided.

Link to comment
Share on other sites

So, I followed your tutorial step by step, but got stuck in before launching the client from IntelliJ idea. As you suggested, I opened cmd in folder with forge and run gradlew setupDecompWorkspace --refresh-dependencies

 

This unfortunatelly end up stuck at 91 percent, and build failed. I was able to find out that one of the addresses requested timed-out (when I tried it in the browser, it loaded okay, it's this one: https://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom), and then I found out, that the other address returns forbidden - which is most likely obstacle that my current installation won't overcome, it's this one: https://libraries.minecraft.net/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom).

 

Do you have any thoughts on how to fix this? Thanks in advance for any help provided.

Link to comment
Share on other sites

It shouldn't try to load them from Mojang's server... Not sure why it does.

 

Man, I really appreciate your fast reply. Have not seen that one coming. I run the gradlew command few more times, hit control + c few times to interrupt it, when I got the impression it crashed and then, finally run it again in Idea and it SOMEHOW started working. Don't know, why... it does not load the *.pom file from mojang server now. It works though. Thank.

Link to comment
Share on other sites

It shouldn't try to load them from Mojang's server... Not sure why it does.

 

Man, I really appreciate your fast reply. Have not seen that one coming. I run the gradlew command few more times, hit control + c few times to interrupt it, when I got the impression it crashed and then, finally run it again in Idea and it SOMEHOW started working. Don't know, why... it does not load the *.pom file from mojang server now. It works though. Thank.

Link to comment
Share on other sites

Usually, this kind of problem happens when you have network problems. If the dependency is not available or reachable in the default location, it tries _all repos_ - that's why you see gradle trying to hit mojang's server.

just you wait! ;)

Link to comment
Share on other sites

Usually, this kind of problem happens when you have network problems. If the dependency is not available or reachable in the default location, it tries _all repos_ - that's why you see gradle trying to hit mojang's server.

just you wait! ;)

Link to comment
Share on other sites

  • 3 months later...

I'm looking for hints on the best practices for mod development.

 

Here's the question:

 

In the minds of Forge developers when they consider making a new mod, are the best practices to use Gradle over Maven as the overall framework for the mod build environment? 

 

What does one offer over the other to make developing a mod easier or more smooth in the context of Minecraft Forge (1.10.2 or later)?

 

Thanks.

 

 

Link to comment
Share on other sites

I'm looking for hints on the best practices for mod development.

 

Here's the question:

 

In the minds of Forge developers when they consider making a new mod, are the best practices to use Gradle over Maven as the overall framework for the mod build environment? 

 

What does one offer over the other to make developing a mod easier or more smooth in the context of Minecraft Forge (1.10.2 or later)?

 

Thanks.

 

Forge's official build system is ForgeGradle (a Gradle plugin). This sets up everything you need to develop a mod and handles the reobfuscation process when building the mod.

 

To use Maven, you'd have to re-implement all this yourself or find a way to integrate with ForgeGradle.

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.

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.

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

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.