Jump to content

Does this quirk still exist when developing mods with IntelliJ?


Recommended Posts

Posted

I am not really sure if the title give the best impression of what I am asking.

 

I want to develop a mod using IntelliJ but when looking on how to setup my dev environment I came across this part on the Forge wiki.

 

Many thanks to Democre for this fix - the original source can be found here in his post on the Forge forums.

For some reason, FML tries to classload the Java runtime JAR, which is on the classpath along with any mods you write. This would be fine, except it throws an error while trying to parse it. For an error-free runtime log, open the JarDiscoverer class by pressing Ctrl + N or navigating to cpw.mods.fml.common.discovery.JarDiscoverer.java in the project explorer. Insert the following lines of code into this file (the first and last lines shown here are for context only and should already exist):

42    jar = new JarFile(candidate.getModContainer());

43

44    // TODO: Remove these lines for distribution build:

45    // *** START INTELLIJ FIX ***

46    if (jar.getName().endsWith("rt.jar")) return foundMods;

47    // *** END INTLELIJ FIX ***

48   

49    if ( ..

Don't forget to remove these lines before running the MCP scripts to build, obfuscate and package your mod for distribution.

 

I was just wondering if this quirk still exists or if it has been patched. If not there another way to get IntelliJ to run forge without generating a bunch of errors related to the above?

“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.” - Linus Torvalds

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.