dstars5 Posted April 29, 2013 Posted April 29, 2013 Hey guys, I recently finished making my mod, and I want to distribute it. The only problem, when I put the recompiled/reobfuscated mod in Minecraft, it crashes on startup (Crash log below). It works fine when I run it in Eclipse. I have checked, checked, and rechecked the file path and it is all fine. I have reinstalled MCP and tried copying my code over, but it still crashes. Does anyone know why this is happening? I would to get this figured out ASAP. ---- Minecraft Crash Report ---- // I let you down. Sorry Time: 4/28/13 10:17 PM Description: Failed to start game cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: mods.SpawnEggsPlus.common.SpawnEggsPlus at cpw.mods.fml.common.LoadController.transition(LoadController.java:142) at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:410) at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56) at net.minecraft.client.Minecraft.run(Minecraft.java:732) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: mods.SpawnEggsPlus.common.SpawnEggsPlus at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:425) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98) at cpw.mods.fml.common.Loader.loadMods(Loader.java:503) ... 5 more Caused by: java.lang.NullPointerException at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:227) ... 32 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.5.1 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_07, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 420840744 bytes (401 MB) / 648740864 bytes (618 MB) up to 954466304 bytes (910 MB) JVM Flags: 2 total; -Xms512m -Xmx1024m AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed SpawnEggsPlus{1.0} [spawnEggsPlus] (SpawnEggsPlus) Unloaded->Errored LWJGL: 2.4.2 OpenGL: GeForce GTX 570/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Texture Pack: Default Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Quote
dstars5 Posted April 29, 2013 Author Posted April 29, 2013 What do you mean? I have checked to make sure the file structure is the same as that package structure in Eclips. Quote
Tekner Posted April 29, 2013 Posted April 29, 2013 So you're saying that your root folder, "mods, is in "MCP\src\minecraft"? And the full path is "MCP\src\minecraft\mods\SpawnEggsPlus\common\SpawnEggsPlus"? Also, why are one of your folders called "mods"? I'm guessing that's so that you can put your textures and things in there? You should be putting your "mods" data folder directly into the "MCP\jars\bin\minecraft.jar". That may be part of your problem. Lastly, the folder that you're right clicking on to zip up is the "mods" folder in "MCP\reobf", right? And that's after running both "recompile.bat" AND "reobfuscate.bat"? (or .sh if you're using Unix.) Quote http://img836.imageshack.us/img836/1237/cooltext624963071.png[/img] I make games, minecraft mods/plugins, and some graphic art. Current Project: LoECraft - An industrial minecraft server with its own modpack and custom launcher.
snipermine Posted April 29, 2013 Posted April 29, 2013 I had the same problem. It was as simple as i didn't make it a .zip it was a .rar worth a shot Quote
dstars5 Posted April 29, 2013 Author Posted April 29, 2013 So you're saying that your root folder, "mods, is in "MCP\src\minecraft"? And the full path is "MCP\src\minecraft\mods\SpawnEggsPlus\common\SpawnEggsPlus"? Also, why are one of your folders called "mods"? I'm guessing that's so that you can put your textures and things in there? You should be putting your "mods" data folder directly into the "MCP\jars\bin\minecraft.jar". That may be part of your problem. Lastly, the folder that you're right clicking on to zip up is the "mods" folder in "MCP\reobf", right? And that's after running both "recompile.bat" AND "reobfuscate.bat"? (or .sh if you're using Unix.) Not entirely sure what you are saying here, but I think I might have missed a step? I first completed the code and found it ran fine. I then ran recompile.bat then reobfuscate.bat. I went into the Reobf folder and found "SpawnEggsPlus" folder with "client" and "common" in it. I went back to my src folder and copied the "textures" folder into the reobf/minecraft/mods/SpawnEggsPlus folder. I then right clicked the SpawnEggsPlus folder and compressed it into zip. I put this zip into the .minecraft/mods folder (So the path looks like .minecraft/mods/SpawnEggsPlus/SpawnEggsPlus with the textures, client, and common folders inside with all of the right code and textures). I am not sure whether I should have a SpawnEggsPlus folder inside the zipped folder of the same name, so the last thing I tried was to put the client, common, and texture folders directly in the zipped folder, but I got the same error. Not sure if that answered your questions or not. Am I doing something wrong here? Quote
Tekner Posted April 30, 2013 Posted April 30, 2013 I had a feeling it had to do with the mods folder being part of your package hierarchy. Quote http://img836.imageshack.us/img836/1237/cooltext624963071.png[/img] I make games, minecraft mods/plugins, and some graphic art. Current Project: LoECraft - An industrial minecraft server with its own modpack and custom launcher.
saxon564 Posted April 30, 2013 Posted April 30, 2013 Diesie is correct on how the file path should be, if it still doesnt make sence gotohttp://www.minecraftforge.net/forum/index.php/topic,7482 and read that, it will make more sence. Quote
dstars5 Posted April 30, 2013 Author Posted April 30, 2013 See: there is your issue. Your package is mods.SpawnEggsPlus. So your zip file needs to contain: zip-Root |__mods |__SpawnEggsPlus |__SpawneggsPlus.class This zip file gets into the mods folder. Cool, thank you! One last question, I notice a lot of other mods don't have that same hierarchy. To remove that "mods" folder from the hierarchy, is it as simple as changing to package name? Doesn't really matter, because it is working! But just wondering. 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.
Note: Your post will require moderator approval before it will be visible.