Eyowin Posted August 28, 2012 Share Posted August 28, 2012 I am the creator of the Usefull_Cobble mod, and I wanted to switch from ModLoader to FML, but when I try and run Minecraft through eclipse (so that I can test my mod) I get an error. I checked after installing Forge into my mcp and Minecraft was able to run just fine, but after adding in my mod, it no longer works. I have checked for errors in the code, but eclipse doesn't show any. Here is the error that is given when trying to run: Minecraft has crashed! ---------------------- Minecraft has stopped running because it encountered a problem; Failed to start game This error has been saved to C:\Users\Dawson\AppData\Roaming\.minecraft\mcp72\jars\.\crash-reports\crash-2012-08-27_21.43.51-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone. --- BEGIN ERROR REPORT f243d038 -------- Generated 8/27/12 9:43 PM - Minecraft Version: 1.3.2 - Operating System: Windows 7 (amd64) version 6.1 - Java Version: 1.7.0_02, Oracle Corporation - Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation - Memory: 971890576 bytes (926 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) - JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M - LWJGL: 2.4.2 - OpenGL: Intel 965/963 Graphics Media Accelerator GL version 2.0.0 - Build 8.14.10.1930, Intel - Is Modded: Definitely; 'forge,fml' - Type: Client - Texture Pack: Default - Profiler Position: N/A (disabled) cpw.mods.fml.common.LoaderException: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1 at cpw.mods.fml.common.LoadController.transition(LoadController.java:106) at cpw.mods.fml.common.Loader.loadMods(Loader.java:421) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:192) at net.minecraft.client.Minecraft.startGame(Minecraft.java:402) at net.minecraft.client.Minecraft.run(Minecraft.java:734) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1 at java.util.BitSet.clear(Unknown Source) at cpw.mods.fml.client.SpriteHelper.getFreeSlot(SpriteHelper.java:131) at cpw.mods.fml.client.SpriteHelper.getUniqueSpriteIndex(SpriteHelper.java:107) at cpw.mods.fml.client.registry.RenderingRegistry.addTextureOverride(RenderingRegistry.java:103) at net.minecraft.src.ModLoader.addOverride(ModLoader.java:174) at net.minecraft.src.mod_Usefull_Cobble.<init>(mod_Usefull_Cobble.java:439) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:504) 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:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:127) 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:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:85) at cpw.mods.fml.common.Loader.loadMods(Loader.java:420) ... 4 more --- END ERROR REPORT 40ea6fba ---------- If more info is needed, just let me know and I will happily provide. I would like to get this problem fixed soon, so that I can update my mod once again. Quote Link to comment Share on other sites More sharing options...
LexManos Posted August 28, 2012 Share Posted August 28, 2012 at net.minecraft.src.ModLoader.addOverride(ModLoader.java:174) at net.minecraft.src.mod_Usefull_Cobble.<init>(mod_Usefull_Cobble.java:439) Exactly how many damn sprites are you using? Move to a custom texture sheet, quit useing addOverride. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
Eyowin Posted August 28, 2012 Author Share Posted August 28, 2012 This mod was originally a ModLoader mod, so I had to use a sprite for each one. I totaled to be somewhere around 60 or 70. Thanks for you help. Quote Link to comment Share on other sites More sharing options...
LexManos Posted August 28, 2012 Share Posted August 28, 2012 There are 71 item sprites free, and 32 terrain sprites... And From the looks of it, its going to go down even more in the next version. And you want a single mod to take more then 1/2 of it? People wonder why we think using addOverride is stupid. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
Eyowin Posted August 28, 2012 Author Share Posted August 28, 2012 now that I know what the problem is, I have been able to fix it. I have made a sprite sheet, and will use that from now on. Thank you for all of your help. Quote Link to comment Share on other sites More sharing options...
Eyowin Posted September 1, 2012 Author Share Posted September 1, 2012 I have switched over from using a gazillion @overrides and using to many sprite indices to using a sprite sheet, but now I have a new problem. I have looked at several tutorials and as far as I can tell I have the code correctly written, but when I start the game, the textures for the items get loaded from the default mineraft Item sprites, meaning that all of the pictures are wrong and some of them get no image at all since the spot used in my sprite sheet are empty on the default one. If you want to see my code, I can upload it. Please help me get this fixed. Quote Link to comment Share on other sites More sharing options...
luacs1998 Posted September 1, 2012 Share Posted September 1, 2012 Recompile, reobfuscate, include your images wherever you told your mod to look, install onto a production Minecraft. Does it work? Quote Read the EAQ before posting! OR ELSE! This isn't building better software, its trying to grab a place in the commit list of a highly visible github project. www.forgeessentials.com Don't PM me, I don't check this account unless I have to. Link to comment Share on other sites More sharing options...
tarun1998 Posted September 1, 2012 Share Posted September 1, 2012 Did you call setTextureFile in your block and item classes? Quote Link to comment Share on other sites More sharing options...
Eyowin Posted September 1, 2012 Author Share Posted September 1, 2012 tarun1998 I'm not sure what you mean. I am new to using forge so I'm still getting familiar with how it works. Quote Link to comment Share on other sites More sharing options...
XEZKalvin Posted September 1, 2012 Share Posted September 1, 2012 I think it might help if you look at the tutorials on the wiki here: http://www.minecraftforge.net/wiki/Tutorials Most of them are outdated so do not copy any code completly since there mostly are class name changes and packet changes. But I suggest you find out how to use a custom texture sheet first. Quote Link to comment Share on other sites More sharing options...
tarun1998 Posted September 1, 2012 Share Posted September 1, 2012 If you want to use textures from a custom sprite sheet, then you gotta call getTextureFile. Place this in your Item/Block class: public String getTextureFile() { return "Wherever your file is stored"; } Quote Link to comment Share on other sites More sharing options...
Eyowin Posted September 1, 2012 Author Share Posted September 1, 2012 I didn't know that, thanks. I will add this in and hope it works. Thanks again. Quote Link to comment Share on other sites More sharing options...
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.