Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • User Submitted Tutorials
  • Using Intellij IDEA for Mod-Development with ForgeGradle
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 7
diesieben07

Using Intellij IDEA for Mod-Development with ForgeGradle

By diesieben07, July 16, 2014 in User Submitted Tutorials

  • Reply to this topic
  • Start new topic
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • Page 4 of 6  

Recommended Posts

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted February 12, 2016

Well, the gradle cache has nothing to do with Intellij per se. Intellij has it's own cache, which this clears. It has it's hiccups from time to time.

  • Quote

Share this post


Link to post
Share on other sites

Axium1998    0

Axium1998

Axium1998    0

  • Tree Puncher
  • Axium1998
  • Forge Modder
  • 0
  • 4 posts
Posted March 5, 2016

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

  • Quote

Share this post


Link to post
Share on other sites

erindalc    0

erindalc

erindalc    0

  • Tree Puncher
  • erindalc
  • Members
  • 0
  • 4 posts
Posted March 11, 2016

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?

 

 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted March 11, 2016

You need to click the refresh button in the gradle sidebar after you run the setup.

  • Quote

Share this post


Link to post
Share on other sites

erindalc    0

erindalc

erindalc    0

  • Tree Puncher
  • erindalc
  • Members
  • 0
  • 4 posts
Posted March 11, 2016

Thank you so much. Derp.

  • Quote

Share this post


Link to post
Share on other sites

rhymer    0

rhymer

rhymer    0

  • Tree Puncher
  • rhymer
  • Members
  • 0
  • 1 post
Posted March 12, 2016

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!

  • Quote

Share this post


Link to post
Share on other sites

NovaViper    3

NovaViper

NovaViper    3

  • World Shaper
  • NovaViper
  • Forge Modder
  • 3
  • 1061 posts
Posted March 19, 2016

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?

  • Quote

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!

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted March 19, 2016

In the newest IntelliJ you have to manually select the correct classpath module:

 

49qpav0.png

  • Quote

Share this post


Link to post
Share on other sites

NovaViper    3

NovaViper

NovaViper    3

  • World Shaper
  • NovaViper
  • Forge Modder
  • 3
  • 1061 posts
Posted March 19, 2016

How do I select the classpath module?

  • Quote

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!

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted March 19, 2016

In the run configuration screen, like I showed.

  • Quote

Share this post


Link to post
Share on other sites

NovaViper    3

NovaViper

NovaViper    3

  • World Shaper
  • NovaViper
  • Forge Modder
  • 3
  • 1061 posts
Posted March 19, 2016

Thanks, it fixed that error.

  • Quote

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!

Share this post


Link to post
Share on other sites

Taji34    5

Taji34

Taji34    5

  • Creeper Killer
  • Taji34
  • Forge Modder
  • 5
  • 147 posts
Posted April 11, 2016

In the newest IntelliJ you have to manually select the correct classpath module:

 

49qpav0.png

 

This should be added to the OP.

  • Quote

Share this post


Link to post
Share on other sites

DeadPix    5

DeadPix

DeadPix    5

  • Tree Puncher
  • DeadPix
  • Members
  • 5
  • 32 posts
Posted May 24, 2016

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.

  • Quote

Share this post


Link to post
Share on other sites

DeadPix    5

DeadPix

DeadPix    5

  • Tree Puncher
  • DeadPix
  • Members
  • 5
  • 32 posts
Posted May 24, 2016

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.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted May 24, 2016

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

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted May 24, 2016

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

  • Quote

Share this post


Link to post
Share on other sites

DeadPix    5

DeadPix

DeadPix    5

  • Tree Puncher
  • DeadPix
  • Members
  • 5
  • 32 posts
Posted May 24, 2016

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.

  • Quote

Share this post


Link to post
Share on other sites

DeadPix    5

DeadPix

DeadPix    5

  • Tree Puncher
  • DeadPix
  • Members
  • 5
  • 32 posts
Posted May 24, 2016

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.

  • Quote

Share this post


Link to post
Share on other sites

jcranky    19

jcranky

jcranky    19

  • Creeper Killer
  • jcranky
  • Forge Modder
  • 19
  • 106 posts
Posted May 26, 2016

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.

  • Quote

just you wait! ;)

Share this post


Link to post
Share on other sites

jcranky    19

jcranky

jcranky    19

  • Creeper Killer
  • jcranky
  • Forge Modder
  • 19
  • 106 posts
Posted May 26, 2016

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.

  • Quote

just you wait! ;)

Share this post


Link to post
Share on other sites

mondo    0

mondo

mondo    0

  • Tree Puncher
  • mondo
  • Members
  • 0
  • 3 posts
Posted August 26, 2016

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.

 

 

  • Quote

Share this post


Link to post
Share on other sites

Choonster    1651

Choonster

Choonster    1651

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1651
  • 5099 posts
Posted August 26, 2016

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.

  • Quote

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.

Share this post


Link to post
Share on other sites

mondo    0

mondo

mondo    0

  • Tree Puncher
  • mondo
  • Members
  • 0
  • 3 posts
Posted August 27, 2016

Right.  I see now how effective it is to start with the MDK.

 

Thanks.

 

  • Quote

Share this post


Link to post
Share on other sites

richard    0

richard

richard    0

  • Tree Puncher
  • richard
  • Members
  • 0
  • 4 posts
Posted August 29, 2016

Thanks for the instructions!

 

In the newest IntelliJ you have to manually select the correct classpath module:

 

49qpav0.png

 

This should be added to the OP.

Registered to second this.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7614

diesieben07

diesieben07    7614

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7614
  • 55193 posts
Posted August 29, 2016
This should be added to the OP.

Done.
  • Quote

Share this post


Link to post
Share on other sites
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • Page 4 of 6  

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.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 7
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DaemonUmbra
      net.minecraft.world.biome.biome$category cannot be cast to java.lang.string

      By DaemonUmbra · Posted 54 minutes ago

      Same answer  
    • DaemonUmbra
      1.12.2 won’t install

      By DaemonUmbra · Posted 54 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • DaemonUmbra
      1.16.5 Modpack "Missing License Information"

      By DaemonUmbra · Posted 54 minutes ago

      This is either a bug in a mod, or you installed mods that won't work with your current version of Minecraft. Note that mods are rarely ever compatible with multiple versions of Minecraft.
    • kiou.23
      [1.16.4] Custom item enchantability

      By kiou.23 · Posted 59 minutes ago

      well obviously, Enchantment#canApply(), calls ItemStack#CanApplyAtEnchantingTable(), which calls Item#canApplyAtEnchantingTable. Therefore, you got yourself an infinite loop...
    • AndrewLI
      World creation in 1.16.x

      By AndrewLI · Posted 1 hour ago

      Hi I want to write a new mod in forge 1.16.4, which should generate a new (water) world, and add later the usual blocks there. But I found only old tutorials, that use IWorldGenerator. And I cannot find a new (json-based) world generator. Does anyone know a tutorial or documentation of the new world generation?
  • Topics

    • LOLCREW
      3
      net.minecraft.world.biome.biome$category cannot be cast to java.lang.string

      By LOLCREW
      Started January 8

    • Winterlotus16
      1
      1.12.2 won’t install

      By Winterlotus16
      Started 1 hour ago

    • elliotfoxk
      1
      1.16.5 Modpack "Missing License Information"

      By elliotfoxk
      Started 1 hour ago

    • AzizD
      4
      [1.16.4] Custom item enchantability

      By AzizD
      Started 4 hours ago

    • AndrewLI
      0
      World creation in 1.16.x

      By AndrewLI
      Started 1 hour ago

  • Who's Online (See full list)

    • vio
    • PyRoTheLifeLess
    • Joshua66252
    • AndrewLI
    • Jakans
    • DaemonUmbra
  • All Activity
  • Home
  • Mod Developer Central
  • User Submitted Tutorials
  • Using Intellij IDEA for Mod-Development with ForgeGradle
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community