Gibbynator Posted July 3, 2012 Posted July 3, 2012 I've made a few items for my mod, and as far as I can tell, they don't generate any errors. However, one of the items requires IC2 (it is an electric tool). So, I copy industrialcraft 1.95 client.jar from the mods folder of Tekkit to the mods folder in MCP/jars/mods. Then, I get this error. So I figure I need to install Risu's Modloader, even though forge SAYS it has it included. Still getting the error below. Of note: I included net.minecraft.src.ic2.api in my source code. I doubt that would be causing a noclassdef error. Anything I did wrong? If you want to check my code, https://github.com/Gibbycraft/Gibbycraft-mod/tree/master/net 3 mods loaded Minecraft Forge 3.3.7.135 FML v2.2.48.135 Forge Mod Loader version 2.2.48.135 for Minecraft 1.2.5 mod_Aragami : Loaded (src) mod_Gibbycraft : Loaded (src) mod_MinecraftForge : Loaded (src) Minecraft has crashed! ---------------------- Minecraft has stopped running because it encountered a problem. --- BEGIN ERROR REPORT 25e7fe59 -------- Generated 7/2/12 9:49 PM Minecraft: Minecraft 1.2.5 OS: Windows 7 (amd64) version 6.1 Java: 1.7.0_03, Oracle Corporation VM: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation LWJGL: 2.4.2 OpenGL: ATI Mobility Radeon HD 4870 version 3.3.10151 Compatibility Profile Context, ATI Technologies Inc. cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: forge/IConnectionHandler at cpw.mods.fml.common.Loader.load(Loader.java:436) at cpw.mods.fml.common.Loader.loadMods(Loader.java:592) at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193) at net.minecraft.client.Minecraft.startGame(Minecraft.java:383) at net.minecraft.client.Minecraft.run(Minecraft.java:735) at java.lang.Thread.run(Unknown Source) Caused by: cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: forge/IConnectionHandler at cpw.mods.fml.common.Loader.loadModClass(Loader.java:527) at cpw.mods.fml.common.Loader.attemptFileLoad(Loader.java:561) at cpw.mods.fml.common.Loader.load(Loader.java:419) ... 5 more Caused by: java.lang.NoClassDefFoundError: forge/IConnectionHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.Loader.loadModClass(Loader.java:494) ... 7 more Caused by: java.lang.ClassNotFoundException: forge.IConnectionHandler at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 23 more --- END ERROR REPORT 4d854ee5 ---------- Quote
gotyaoi Posted July 3, 2012 Posted July 3, 2012 I'm not sure why you did that with the jar. Looking at your code, you're using the api correctly, though don't forget the static methods in ElectricItem. Is there something that prompted you to throw the jar in there, cause it seems like a pretty odd course of action. Quote
jakj Posted July 3, 2012 Posted July 3, 2012 MCP and mods don't play well together. What you should be doing is compiling it with just the API source files, and then reobfuscating and running it in a vanilla Minecraft with just the mods you need to test with installed. You can easily create a shell script or batch file to do these steps for you, that will call MCP's "reobfuscate" script, then delete all files from your .minecraft/mods/foo directory, and then copy them in again. (If you are modifying base classes, this becomes more problematic, because you have to try to script something like 7zip to update the .jar.) Mods in the mods folder load just fine from a directory instead of a .zip file. Quote
Gibbynator Posted July 4, 2012 Author Posted July 4, 2012 I followed what jakj said, and I got a new issue this time: the dreaded black screen. According to the FML log below, it loaded all the mod files just fine. I made sure to delete META-INF from the minecraft.jar, and add NEI 1.2.2.4 into the jar so I can test it. Log as follows: 2012-07-04 00:10:22 [iNFO] Forge Mod Loader version 2.2.48.135 for Minecraft 1.2.5 loading 2012-07-04 00:10:22 [FINE] Attempting to load mods contained in the minecraft jar file and associated classes 2012-07-04 00:10:22 [FINE] Found a minecraft related file at C:\Users\Gibby\AppData\Roaming\.minecraft\bin\lwjgl.jar, loading 2012-07-04 00:10:22 [FINE] Found a minecraft related file at C:\Users\Gibby\AppData\Roaming\.minecraft\bin\jinput.jar, loading 2012-07-04 00:10:22 [FINE] Found a minecraft related file at C:\Users\Gibby\AppData\Roaming\.minecraft\bin\lwjgl_util.jar, loading 2012-07-04 00:10:22 [FINE] Found a minecraft related file at C:\Users\Gibby\AppData\Roaming\.minecraft\bin\minecraft.jar, loading 2012-07-04 00:10:22 [FINE] Found a mod class mod_MinecraftForge in file minecraft.jar, attempting to load it 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_MinecraftForge found, loading 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_MinecraftForge loaded 2012-07-04 00:10:22 [FINE] Mod class mod_MinecraftForge loaded successfully 2012-07-04 00:10:22 [FINE] Found a mod class mod_NotEnoughItems in file minecraft.jar, attempting to load it 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_NotEnoughItems found, loading 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_NotEnoughItems loaded 2012-07-04 00:10:22 [FINE] Mod class mod_NotEnoughItems loaded successfully 2012-07-04 00:10:22 [FINE] Minecraft jar mods loaded successfully 2012-07-04 00:10:22 [iNFO] Loading mods from C:\Users\Gibby\AppData\Roaming\.minecraft\mods 2012-07-04 00:10:22 [FINE] Found a directory Gibbycraft, attempting to load it 2012-07-04 00:10:22 [FINEST] Recursing into package gibbycraft 2012-07-04 00:10:22 [FINEST] Recursing into package gibbycraft.gui 2012-07-04 00:10:22 [FINEST] Recursing into package ic2 2012-07-04 00:10:22 [FINEST] Recursing into package ic2.api 2012-07-04 00:10:22 [FINE] Found a mod class mod_Aragami in directory Gibbycraft, attempting to load it 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_Aragami found, loading 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_Aragami loaded 2012-07-04 00:10:22 [FINE] Successfully loaded mod class mod_Aragami.class 2012-07-04 00:10:22 [FINE] Found a mod class mod_Gibbycraft in directory Gibbycraft, attempting to load it 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_Gibbycraft found, loading 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_Gibbycraft loaded 2012-07-04 00:10:22 [FINE] Successfully loaded mod class mod_Gibbycraft.class 2012-07-04 00:10:22 [FINE] Directory Gibbycraft loaded successfully 2012-07-04 00:10:22 [FINE] Found a zip or jar file industrialcraft-2-client_1.95b.jar, attempting to load it 2012-07-04 00:10:22 [FINE] Found a mod class mod_IC2 in file industrialcraft-2-client_1.95b.jar, attempting to load it 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_IC2 found, loading 2012-07-04 00:10:22 [FINE] ModLoader BaseMod class mod_IC2 loaded 2012-07-04 00:10:22 [FINE] Failed to find mcmod.info file in industrialcraft-2-client_1.95b.jar for mod_IC2 2012-07-04 00:10:22 [FINE] Mod class mod_IC2 loaded successfully 2012-07-04 00:10:22 [FINE] File industrialcraft-2-client_1.95b.jar loaded successfully 2012-07-04 00:10:22 [iNFO] Forge Mod Loader has loaded 5 mods 2012-07-04 00:10:22 [FINE] Beginning mod pre-initialization 2012-07-04 00:10:22 [FINER] Pre-initializing C:\Users\Gibby\AppData\Roaming\.minecraft\bin\minecraft.jar 2012-07-04 00:10:22 [FINE] Reading existing configuration file for mod_MinecraftForge : mod_MinecraftForge.cfg 2012-07-04 00:10:22 [FINEST] Configuration for mod_MinecraftForge.SPAWNER_ALLOW_ON_INVERTED found values default: true, configured: true, interpreted: true 2012-07-04 00:10:22 [FINE] Configuration for mod_MinecraftForge written to mod_MinecraftForge.cfg 2012-07-04 00:10:22 [FINER] Pre-initializing C:\Users\Gibby\AppData\Roaming\.minecraft\bin\minecraft.jar 2012-07-04 00:10:22 [FINE] Reading existing configuration file for mod_NotEnoughItems : mod_NotEnoughItems.cfg 2012-07-04 00:10:22 [FINE] Configuration for mod_NotEnoughItems written to mod_NotEnoughItems.cfg So I get this idea that NEI is failing to boot, so I deleted it. I also changed around my packages a bit, and where the images were stored, and that seemed to fix it. Now I am enjoying toast and grilled cheese! If a mod wants to trash this thread, go ahead. I got my issue fixed. Quote
jakj Posted July 4, 2012 Posted July 4, 2012 Something I found useful is to run Minecraft with java instead of javaw and pipe the output to a file, since base Minecraft doesn't log as well as Technic's launcher does. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.