Jump to content
  • Home
  • Files
  • Docs
  • Merch
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
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 1 of 6  

Recommended Posts

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 16, 2014 (edited)

Note (Sep. 2017): This post is now getting very old, but it still applies. Regardless you might want to refer to the IntelliJ section in the official Getting Started guide instead.

 

In this Tutorial I will describe how you can use the Intellij IDEA IDE for Mod-Development.

 

First, you are going to need to download the Mod Development Kit ("MDK") package from http://files.minecraftforge.net/ ("src" for old versions) and unzip it.

 

Next, start up Intellij. If you already have a Project opened, select File > Open, otherwise select "Open Project". Navigate to the directory where you unzipped Forge to and select the build.gradle file. Leave the import-settings at default and click OK.

Intellij will now take a while to import the project. Once that's done, open the Gradle-sidebar.

If the sidebar is not visible, click the view-switcher in the bottom-left corner: oeiuGXW.png

 

Select the setupDecompWorkspace task from the list and run it (double-click). If you don't need the Minecraft source code visible, run setupDevWorkspace instead, it will be faster.

Once the task has finished, click the Refresh button in the Gradle-sidebar. That will again take a moment. Once Intellij has finished refreshing, your project is already almost ready to go. You should be able to see all the libraries used by Forge & Minecraft on the left and also the source code for the ExampleMod inside src/main/java.

 

All that is left to do are the run configurations, so that you can actually start Minecraft. For those again open the Gradle sidebar and run the genIntellijRuns task. Intellij might ask to reload the project, click OK if it does.

 

If your run configurations show an error in most recent versions of IntelliJ you have to go into Run > Edit Configurations and adjust both run configurations like shown below.

49qpav0.png

 

That's it!

Edited September 14, 2017 by diesieben07
Updated for new forum and new ForgeGradle / IntelliJ versions
  • Like 2
  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 17, 2014

I followed this and discovered this problem when trying to run the client:

 

/usr/lib/jvm/java-7-oracle/bin/java -Xincgc -Xmx1024M -Xms1024M -Djava.library.path=/home/jorrit/mc/forge_1.7.10_src/build/natives -Dfml.ignoreInvalidMinecraftCertificates=true -Didea.launcher.port=7533 -Didea.launcher.bin.path=/home/jorrit/idea-IC-135.909/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-7-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-7-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-7-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-7-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-7-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-7-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfxrt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunjce_provider.jar:/home/jorrit/mc/forge_1.7.10_src/classes/production/forge_1.7.10_src:/home/jorrit/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.0.1186/start:/home/jorrit/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.0.1186/forgeSrc-1.7.10-10.13.0.1186.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.minecraft/launchwrapper/1.9/116f2aad5b0c68353ebed66cd463517db6522f7e/launchwrapper-1.9.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-debug-all/4.1/dd6ba5c392d4102458494e29f54f70ac534ec2a2/asm-debug-all-4.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.typesafe.akka/akka-actor_2.11/2.3.3/ed62e9fc709ca0f2ff1a3220daa8b70a2870078e/akka-actor_2.11-2.3.3.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.typesafe/config/1.2.1/f771f71fdae3df231bcd54d5ca2d57f0bf93f467/config-1.2.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-actors-migration_2.11/1.1.0/dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f/scala-actors-migration_2.11-1.1.0.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-compiler/2.11.1/56ea2e6c025e0821f28d73ca271218b8dd04926a/scala-compiler-2.11.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang.plugins/scala-continuations-library_2.11/1.0.2/e517c53a7e9acd6b1668c5a35eccbaa3bab9aac/scala-continuations-library_2.11-1.0.2.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang.plugins/scala-continuations-plugin_2.11.1/1.0.2/f361a3283452c57fa30c1ee69448995de23c60f7/scala-continuations-plugin_2.11.1-1.0.2.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-library/2.11.1/e11da23da3eabab9f4777b9220e60d44c1aab6a/scala-library-2.11.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang.modules/scala-parser-combinators_2.11/1.0.1/f05d7345bf5a58924f2837c6c1f4d73a938e1ff0/scala-parser-combinators_2.11-1.0.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-reflect/2.11.1/6580347e61cc7f8e802941e7fde40fa83b8badeb/scala-reflect-2.11.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-swing_2.11/1.0.1/b1cdd92bd47b1e1837139c1c53020e86bb9112ae/scala-swing_2.11-1.0.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang.modules/scala-xml_2.11/1.0.2/820fbca7e524b530fdadc594c39d49a21ea0337e/scala-xml_2.11-1.0.2.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/4.5/6065cc95c661255349c1d0756657be17c29a4fd3/jopt-simple-4.5.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/lzma/lzma/0.0.1/521616dc7487b42bef0e803bd2fa3faf668101d7/lzma-0.0.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.mojang/realms/1.3.1/f78f5a841b1cf9d50c3382acdbeb7d3078e454d6/realms-1.3.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.8.1/a698750c16740fd5b3871425f4cb3bbaa87f529d/commons-compress-1.8.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.3.3/18f4247ff4572a074444572cee34647c43e7c9c7/httpclient-4.3.3.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f/commons-logging-1.1.3.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.3.2/31fbbff1ddbf98f3aa7377c94d33b0447c646b6e/httpcore-4.3.2.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/java3d/vecmath/1.3.1/a0ae4f51da409fa0c20fa0ca59e6bbc9413ae71d/vecmath-1.3.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.sf.trove4j/trove4j/3.0.3/42ccaf4761f0dfdfa805c9e340d99a755907e2dd/trove4j-3.0.3.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j-core-mojang/51.2/63d216a9311cca6be337c1e458e587f99d382b84/icu4j-core-mojang-51.2.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.paulscode/codecjorbis/20101023/c73b5636faf089d9f00e8732a829577de25237ee/codecjorbis-20101023.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.paulscode/codecwav/20101023/12f031cfe88fef5c1dd36c563c0a3a69bd7261da/codecwav-20101023.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.paulscode/libraryjavasound/20101123/5c5e304366f75f9eaa2e8cca546a1fb6109348b3/libraryjavasound-20101123.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.paulscode/librarylwjglopenal/20100824/73e80d0794c39665aec3f62eee88ca91676674ef/librarylwjglopenal-20100824.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.paulscode/soundsystem/20120107/419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6/soundsystem-20120107.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/io.netty/netty-all/4.0.10.Final/9e50bd52ffe257a0e2cd8d971688d6ce7d174325/netty-all-4.0.10.Final.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/b1b6ea3b7e4aa4f492509a4952029cd8e48019ad/commons-io-2.4.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.9/9ce04e34240f674bc72680f8b843b1457383161a/commons-codec-1.9.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput/2.0.5/39c7796b469a600f72380316f6b1f11db6c2c7c4/jinput-2.0.5.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.java.jutils/jutils/1.0.0/e12fe1fda814bd348c1579329c86943d2cd3c6a6/jutils-1.0.0.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.2.4/a60a5e993c98c864010053cb901b7eab25306568/gson-2.2.4.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.mojang/authlib/1.5.16/ef1582b11fd0943d069cdcb72e99008ac209a283/authlib-1.5.16.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.0-beta9/1dd66e68cccd907880229f9e2de1314bd13ff785/log4j-api-2.0-beta9.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.0-beta9/678861ba1b2e1fccb594bb0ca03114bb05da9695/log4j-core-2.0-beta9.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl/2.9.1/f58c5aabcef0e41718a564be9f8e412fff8db847/lwjgl-2.9.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl_util/2.9.1/290d7ba8a1bd9566f5ddf16ad06f09af5ec9b20e/lwjgl_util-2.9.1.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch/5.16/1f55f009c61637c10c0acfb8b5ffc600f30044b4/twitch-5.16.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-actors/2.11.0/8ccfb6541de179bb1c4d45cf414acee069b7f78b/scala-actors-2.11.0.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/7ff832a6eb9ab6a767f1ade2b548092d0fa64795/jinput-platform-2.0.5-natives-linux.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/385ee093e01f587f30ee1c8a2ee7d408fd732e16/jinput-platform-2.0.5-natives-windows.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/53f9c919f34d2ca9de8c51fc4e1e8282029a9232/jinput-platform-2.0.5-natives-osx.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch-platform/5.16/7c6affe439099806a4f552da14c42f9d643d8b23/twitch-platform-5.16-natives-windows-32.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch-platform/5.16/39d0c3d363735b4785598e0e7fbf8297c706a9f9/twitch-platform-5.16-natives-windows-64.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch-platform/5.16/62503ee712766cf77f97252e5902786fd834b8c5/twitch-platform-5.16-natives-osx.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch-external-platform/4.5/18215140f010c05b9f86ef6f0f8871954d2ccebf/twitch-external-platform-4.5-natives-windows-32.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/tv.twitch/twitch-external-platform/4.5/c3cde57891b935d41b6680a9c5e1502eeab76d86/twitch-external-platform-4.5-natives-windows-64.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.1/4c517eca808522457dd95ee8fc1fbcdbb602efbe/lwjgl-platform-2.9.1-natives-windows.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.1/aa9aae879af8eb378e22cfc64db56ec2ca9a44d1/lwjgl-platform-2.9.1-natives-linux.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.1/2d12c83fdfbc04ecabf02c7bc8cc54d034f0daac/lwjgl-platform-2.9.1-natives-osx.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/17.0/9c6ef172e8de35fd8d4d8783e4821e57cdef7445/guava-17.0.jar:/home/jorrit/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.3.2/90a3822c38ec8c996e84c16a3477ef632cbc87a3/commons-lang3-3.3.2.jar:/home/jorrit/idea-IC-135.909/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain GradleStart
[19:40:19] [main/INFO] [GradleStart]: No arguments specified, assuming client.
[19:40:19] [main/INFO] [GradleStart]: Extra: []
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: /home/jorrit/.gradle/caches/minecraft/assets/indexes/{ASSET_INDEX}.json (No such file or directory)
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at GradleStart.setupAssets(GradleStart.java:274)
at GradleStart.startClient(GradleStart.java:82)
at GradleStart.main(GradleStart.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.io.FileNotFoundException: /home/jorrit/.gradle/caches/minecraft/assets/indexes/{ASSET_INDEX}.json (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileReader.<init>(FileReader.java:72)
at GradleStart.loadAssetsIndex(GradleStart.java:280)
at GradleStart.setupAssets(GradleStart.java:218)
... 7 more

Process finished with exit code 1

 

Anything I missed?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 17, 2014

I am not sure what causes this. For me the fix is to close idea, open the console (cmd) and run setupDecompWorkspace again from there (with --refresh-dependencies).

  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 17, 2014

Actually that works! Thanks a lot. Now I need to make my very first mod :-)

 

I do have another question though. Now to add my own mod I suppose I need to make a module? I did that and copied the example mod code from forge. Added Forge dependencies and it compiles fine. However, how can I change my run configuration to actually add my mod when I run MC?

 

Thanks!

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 17, 2014

No! Don't make a module! All you need to do is create your files inside src/main/java.

  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 17, 2014

Thanks, now it works and I created my very first mod which does absolutely nothing at all :-)

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 18, 2014

I'm a bit confused on how to setup IntelliJ/gradle and github so that I can have a github repository with several mods (each with source and assets) and how to integrade that into the src/main/java dirs and src/main/resources. Is there a good guide on how to set that up with MC and IntelliJ in mind?

 

That's initially why I thought of using modules so that every module could have its own github directory but now it seems that I have to split assets and source?

 

Thanks,

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 18, 2014

You would have a separate repo for every mod. And a separate IDEA project for every mod.

  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 18, 2014

Hmm, doesn't that take up a lot of disk space? Seems not very handy to work like that. Especially if the mods are supposed to work together. Also that still doesn't solve how I can get the separate 'src/main/java' and 'src/main/resources' into a single github repository?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 18, 2014

Why do you want a single repository? That makes no sense. One Repo per mod.

And no, it does not take up a lot of disk space. All the dependencies (including forge, minecraft and their sourcecode) is stored in a central location, thanks to gradle. Even if you have 100 workspaces using the same forge version, you will only get one jar file containing forge, which is used by all workspaces.

  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 18, 2014

Yes I mean one repo for one mod. But the problem is that that repo should contain both the source and the assets dir. But the build dir contains separate src and resource folders. How do I map the folders on my HD to the single repository on github?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 18, 2014

I am not sure what you mean. Your repo should contain both, of course. For that just make the repo in the root, where your build.gradle is. A typical repo then looks like this: https://github.com/diesieben07/SevenCommons

  • Quote

Share this post


Link to post
Share on other sites

McJty    2

McJty

McJty    2

  • Creeper Killer
  • McJty
  • Members
  • 2
  • 129 posts
Posted July 18, 2014

Ok, but that example doesn't seem to have any resources/assets. And that's my problem. With the actual mod it has to be called 'assets' but it is called 'resources' in the project that I created. I guess I'm a bit confused how I could get my assets in the correct place in the github repository.

 

Ah oops! Missed the resources inside the main folder. Sorry!

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted July 18, 2014

The github repo looks exactly like your workspace on your computer.

Assets in src/main/resources, java files in src/main/java.

And yes, the mod I linked has assets: https://github.com/diesieben07/SevenCommons/blob/master/src/main/resources/assets/sevencommons/gui.png

  • Quote

Share this post


Link to post
Share on other sites

Digital_Light    0

Digital_Light

Digital_Light    0

  • Tree Puncher
  • Digital_Light
  • Members
  • 0
  • 1 post
Posted September 3, 2014

I got to the setupDevWorkspace and it returned

(The filename, directory name, or volume label syntax is incorrect)

i am setting up for 1.7.10.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted September 3, 2014

What is the full path to your forge workspace? Did you run setupDevWorkspace from inside IDEA?

  • Quote

Share this post


Link to post
Share on other sites

Ives    2

Ives

Ives    2

  • Tree Puncher
  • Ives
  • Members
  • 2
  • 8 posts
Posted November 23, 2014

Hey!

I'm trying to add javadocs to Forge but haven't succeeded yet. Is there a way to add javadocs to Forge?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted November 23, 2014

If you run setupDecompWorkspace you'll get the sources, which include the Javadoc.

  • Quote

Share this post


Link to post
Share on other sites

GamrCorps    0

GamrCorps

GamrCorps    0

  • Tree Puncher
  • GamrCorps
  • Members
  • 0
  • 16 posts
Posted December 10, 2014

I copied the code exactly in the tutorial but my Minecraft Client will not load my mod anymore. Anyone know how to fix that?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted December 10, 2014

Are there any issues in your console?

  • Quote

Share this post


Link to post
Share on other sites

GamrCorps    0

GamrCorps

GamrCorps    0

  • Tree Puncher
  • GamrCorps
  • Members
  • 0
  • 16 posts
Posted December 11, 2014

No errors or anything, it seems like the classes are just not being made or transferred properly. I use the exact code above too.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45590 posts
Posted December 11, 2014

Is your mod in src/main/java? Is that folder marked as "sources root"?

  • Quote

Share this post


Link to post
Share on other sites

GamrCorps    0

GamrCorps

GamrCorps    0

  • Tree Puncher
  • GamrCorps
  • Members
  • 0
  • 16 posts
Posted December 11, 2014

where would I check if it is marked as sources root? And it is in src/main/java

 

EDIT: Nevermind I found it, it is marked as the sources root.

  • Quote

Share this post


Link to post
Share on other sites

GamrCorps    0

GamrCorps

GamrCorps    0

  • Tree Puncher
  • GamrCorps
  • Members
  • 0
  • 16 posts
Posted December 11, 2014

I have absolutely no clue how I fixed the problem, but I somehow did. Thanks for the support.

  • Quote

Share this post


Link to post
Share on other sites

Player131    0

Player131

Player131    0

  • Tree Puncher
  • Player131
  • Members
  • 0
  • 37 posts
Posted December 14, 2014

I'm trying to rebuild everything on IntelliJ IDEA 14.0 Ultimate (Yes i bought it). But it gives a crash when adding your fix for assets : Error:(1,0) Gradle DSL method not found: 'sourceSets()', is that normal ?

 

After second problem, when i arrive to rebuild the workspace without the crashing line of code (sourceSets thing), my game launches, forge find my mod, but no assets can be compiled, i tried everything and nothing works. The only way i found is forcing resource building by copying folders myself on the classes output folder.

 

 

EDIT : Ok, it's working now, just needed to add the spetial line of code after the rest of the file build.gradle

  • Quote

Share this post


Link to post
Share on other sites
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • Page 1 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

    • matt1999rd
      [1.14-newer] deprecated method onBlockActivated

      By matt1999rd · Posted 1 minute ago

      okay so how can I replace it if I cannot use blockState ? I saw on other post that people in 1.14 are using onBlockActivated too and nothing is suggest to replace it in the Block class unfortunately...
    • DragonITA
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA · Posted 2 minutes ago

      i try with delete the entier Config Folder but it still dont work and the Folder come back.
    • plugsmustard
      on/off button for custom furnace

      By plugsmustard · Posted 3 minutes ago

      what exactly is wrong with them. i was told to return a new packet?
    • JetCobblestone
      [1.14] moving item assignment to a separate function

      By JetCobblestone · Posted 5 minutes ago

      Hey everyone,   I'm trying to move my item assignment into a new class. I've stuck in into the same package as my main and called it ItemsLoader.   package jetcobblestone.firstmod; import jetcobblestone.firstmod.lists.itemList; import net.minecraft.item.Foods; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; public class ItemsLoader { public static final String modid = "first_mod"; public static void Items() { @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll ( itemList.hair_fibre = new Item(new Item.Properties().food(Foods.COOKIE).group(ItemGroup.FOOD).maxStackSize(1)).setRegistryName(location("hair_fibre")) ); } } private static ResourceLocation location(String name) { return new ResourceLocation(modid, name); } } }   This is the new class, however I'm running into an issue with the new Items function. It's giving me an error saying that it's expecting a volatile at the void token. Why is it trying to force me to do this? I don't want to send this to main memory? If I do replace void with volatile, it tells me there's a syntax error on the 'void' token, despite the fact there is no void. Any help would be much appreciated, thank you!
    • Draco18s
      on/off button for custom furnace

      By Draco18s · Posted 9 minutes ago

      Good. Now fix these two lines. https://github.com/drmdgg/marijuanacraft1.14.4/blob/a246b0229e61058b95672d7f4813b5c3deb28229/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L28-L29
  • Topics

    • matt1999rd
      9
      [1.14-newer] deprecated method onBlockActivated

      By matt1999rd
      Started November 1

    • DragonITA
      1
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA
      Started 59 minutes ago

    • plugsmustard
      43
      on/off button for custom furnace

      By plugsmustard
      Started Wednesday at 03:11 PM

    • JetCobblestone
      0
      [1.14] moving item assignment to a separate function

      By JetCobblestone
      Started 5 minutes ago

    • FaxeeK
      0
      Can't launch the game with forge

      By FaxeeK
      Started 42 minutes ago

  • Who's Online (See full list)

    • LexManos
    • Vorquel
    • plugsmustard
    • DragonITA
    • matt1999rd
    • xVoidZx
    • Silverpool64
    • Lea9ue
    • Hendoor64
    • JetCobblestone
    • Atila1091
    • maycool12
    • vaartis
    • Draco18s
    • FaxeeK
    • loordgek
  • All Activity
  • Home
  • Mod Developer Central
  • User Submitted Tutorials
  • Using Intellij IDEA for Mod-Development with ForgeGradle
  • Theme
  • Contact Us
  • Discord

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