Jump to content

Setting up using IntelliJ


Wikid

Recommended Posts

I am having issues setting up MCP and Forge in IntelliJ IDEA. It seems run minecraft fine but gives me a few errors and I have tried multiple ways to try and fix it with no luck.

 

It seems to think some files are the same names yet my mod files are empty they are just folders at the moment.

 

It also seems to be having issues with the rt.jar file from the JDK and I have updated and reinstalled it a few times now.

 

I have tried to pull a project in from Eclipse and I still get the same errors.

 

 

2013-03-07 18:54:32 [iNFO] [ForgeModLoader] Forge Mod Loader version 4.7.35.556 for Minecraft 1.4.7 loading

2013-03-07 18:54:33 [iNFO] [sTDOUT] 27 achievements

2013-03-07 18:54:33 [iNFO] [sTDOUT] 210 recipes

2013-03-07 18:54:33 [iNFO] [sTDOUT] Setting user: Player452, -

2013-03-07 18:54:33 [iNFO] [sTDERR] Client asked for parameter: server

2013-03-07 18:54:33 [iNFO] [sTDOUT] LWJGL Version: 2.4.2

2013-03-07 18:54:34 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization

2013-03-07 18:54:34 [iNFO] [sTDOUT] MinecraftForge v6.6.2.534 Initialized

2013-03-07 18:54:34 [iNFO] [ForgeModLoader] MinecraftForge v6.6.2.534 Initialized

2013-03-07 18:54:34 [iNFO] [sTDOUT] Replaced 84 ore recipies

2013-03-07 18:54:34 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization

2013-03-07 18:54:34 [iNFO] [ForgeModLoader] Reading custom logging properties from F:\Tier-5 Workspace\config\logging.properties

2013-03-07 18:54:34 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL

2013-03-07 18:54:34 [iNFO] [ForgeModLoader] Searching F:\Tier-5 Workspace\mods for mods

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] Unable to read a class file correctly

java.lang.NullPointerException

at org.objectweb.asm.Type.getObjectType(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.beginNewTypeName(ASMModParser.java:55)

at cpw.mods.fml.common.discovery.asm.ModClassVisitor.visit(ModClassVisitor.java:26)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:42)

at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:55)

at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:30)

at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:52)

at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:103)

at cpw.mods.fml.common.Loader.identifyMods(Loader.java:338)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:470)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:161)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:412)

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

at net.minecraft.client.Minecraft.run(Minecraft.java:746)

at java.lang.Thread.run(Thread.java:722)

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] There was a problem reading the entry java/lang/Object.class in the jar C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar - probably a corrupt zip

cpw.mods.fml.common.LoaderException: java.lang.NullPointerException

at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:47)

at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:55)

at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:30)

at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:52)

at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:103)

at cpw.mods.fml.common.Loader.identifyMods(Loader.java:338)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:470)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:161)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:412)

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

at net.minecraft.client.Minecraft.run(Minecraft.java:746)

at java.lang.Thread.run(Thread.java:722)

Caused by: java.lang.NullPointerException

at org.objectweb.asm.Type.getObjectType(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.beginNewTypeName(ASMModParser.java:55)

at cpw.mods.fml.common.discovery.asm.ModClassVisitor.visit(ModClassVisitor.java:26)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:42)

... 11 more

2013-03-07 18:54:36 [WARNING] [ForgeModLoader] Zip file rt.jar failed to read properly, it will be ignored

cpw.mods.fml.common.LoaderException: java.lang.NullPointerException

at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:47)

at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:55)

at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:30)

at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:52)

at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:103)

at cpw.mods.fml.common.Loader.identifyMods(Loader.java:338)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:470)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:161)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:412)

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

at net.minecraft.client.Minecraft.run(Minecraft.java:746)

at java.lang.Thread.run(Thread.java:722)

Caused by: java.lang.NullPointerException

at org.objectweb.asm.Type.getObjectType(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.beginNewTypeName(ASMModParser.java:55)

at cpw.mods.fml.common.discovery.asm.ModClassVisitor.visit(ModClassVisitor.java:26)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at org.objectweb.asm.ClassReader.accept(Unknown Source)

at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:42)

... 11 more

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.BaseMod. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.EntityRendererProxy. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.MLProp. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.ModLoader. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.ModTextureAnimation. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.ModTextureStatic. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.TradeEntry. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

2013-03-07 18:54:36 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 3 mods to load

2013-03-07 18:54:36 [iNFO] [mcp] Activating mod mcp

2013-03-07 18:54:36 [iNFO] [FML] Activating mod FML

2013-03-07 18:54:36 [iNFO] [Forge] Activating mod Forge

2013-03-07 18:54:36 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

2013-03-07 18:54:36 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-03-07 18:54:37 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-03-07 18:54:37 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-03-07 18:54:37 [iNFO] [sTDOUT] OpenAL initialized.

2013-03-07 18:54:37 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 3 mods

 

 

Thanks

 

Link to comment
Share on other sites

MCP comes with it's own eclipse folder setup for working with eclipse, if you are using a different IDE I guess you have to setup everything on your own. But if you get the code working with eclipse without using the mcp/eclipse folder as the workspace for eclipse then I see no reason why your IDE shouldnt work as well...

 

Have you tried looking at the IntelliJ's forums for support with that specific IDE?

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

There is only one post on their forums and it links back to a post on the minecraft forums. That post only covers setting up the MCP without forge, which shouldn't be any different other than adding the extra jars from the lib folder that forge pulls in. Doing it that way nets me the same results however.

 

Not really sure what else to try to do to fix the issue.

 

Thanks

Link to comment
Share on other sites

I'm developing my mod in intellij for some (few months) and I wasn't able to get rid of this. It's probably connected to the IDE's passing of classpath, but I wasn't able to solve it. Well, to be honest I didn't tried really hard, it does not affect anything...

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

Well I think part of the issue with it thinking that the mod has files with the same name is where it runs the test environment. I managed to get it to stop giving me those issues after I made my own eclipse workspace then imported that but I am still trying to figure out how to get the same results without importing it from eclipse.

 

I was curious if it affected anything when trying to create a mod. Me personally I would like to have a test environment that is error free otherwise it can make it difficult to know what is causing what errors.

Link to comment
Share on other sites

Me personally I would like to have a test environment that is error free

I'd like that too, but if I can't figure it out, I'll live with it.

 

otherwise it can make it difficult to know what is causing what errors.

not really, I'm working even with coremod code wihout any problems. after few days/weeks I got used to those lines and now I automatically ignore them. (although this could be an issue, if you're going to work on FML)

 

but if you find a solution, please do share with us, I'd still like the output to be nice and clean ;D.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

  • 3 weeks later...
2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] There was a problem reading the entry java/lang/Object.class in the jar C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar - probably a corrupt zip

 

There is a known problem with running a re-compiled Minecraft client under Java 1.7 - try installing 1.6 as well, then ensure your project SDK is set to use the 1.6 JDK.

Link to comment
Share on other sites

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] There was a problem reading the entry java/lang/Object.class in the jar C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar - probably a corrupt zip

This is because IntelliJ IDEA puts all of the java libs in the classpath, and for whatever reason Forge cannot read that jar file. The real fix would be for Forge to catch this error gracefully. One workaround is to make a new JDK in IDEA (CTRL+ALT+SHIFT+S, SDKs on the left, plus at the top, point to your 1.7 JDK install) and remove all of the classpath jars. Then use this alternative JRE in your run configuration.

 

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.BaseMod. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

 

This is from Forge making sure that net.minecraft.src packages are only inside the minecraft jar. I am assuming you are recompiling the whole Minecraft source in IDEA, so the Minecraft jar is actually your output folder. You need to reorder the dependencies of this module so that the <module source> is the first entry, not the java JDK. In any other child modules that depend on this module, you will need to make sure this module comes first on the dependency list before the child's <module source>.

Link to comment
Share on other sites

  • 1 month later...
2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] There was a problem reading the entry java/lang/Object.class in the jar C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar - probably a corrupt zip

 

How to fix this error:

Edit cpw.mods.fml.common.discovery.JarDiscoverer.java to include the following: (the first few lines are context and are in the discover method)

 

        ZipFile jar = null;
        try
        {
            jar = new ZipFile(candidate.getModContainer());

            //...
            //insert the following snippet to make the errors go away
            //this effectively shortcuts this method and returns without trying to process the classes jar
            //caveat: if for some reason you have any mod archive on the classpath that ends in classes.jar, 
            // it will skip that too

            if(jar.getName().endsWith("classes.jar"))
            {
                return foundMods;
            }

            //... /end snippet

 

After you have modified the source, run the recompile script from mcp and you should have no more errors.

 

2013-03-07 18:54:36 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.BaseMod. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

 

This is from Forge making sure that net.minecraft.src packages are only inside the minecraft jar. I am assuming you are recompiling the whole Minecraft source in IDEA, so the Minecraft jar is actually your output folder. You need to reorder the dependencies of this module so that the <module source> is the first entry, not the java JDK. In any other child modules that depend on this module, you will need to make sure this module comes first on the dependency list before the child's <module source>.

This works very well for the other errors. Thank you!

 

I now have a completely clean run (except for the LWGL error and the 1.6 release flag error, but those can be ignored)

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