Posted October 21, 201213 yr I created some very basic blocks and items (As I am new to forge, but not modding) and when I ran the client I seemed to have run into this error: cpw.mods.fml.common.LoaderException: java.lang.reflect.InvocationTargetException at cpw.mods.fml.common.LoadController.transition(LoadController.java:102) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:640) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:183) at net.minecraft.client.Minecraft.startGame(Minecraft.java:461) at net.minecraft.client.Minecraft.run(Minecraft.java:748) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:437) 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:124) 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:81) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:639) ... 4 more Caused by: java.lang.NullPointerException at automine.common.AMCore.load(AMCore.java:45) ... 30 more I'm using MC 1.3.2 and the latest Forge build. If it helps here's my Core class: package automine.common; import net.minecraft.src.ItemStack; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Block; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.SidedProxy; @Mod(modid = "AM", name = "AutoMine", version = "v1.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class AMCore { @SidedProxy(clientSide = "automine.common.ClientProxyAutoMine", serverSide = "automine.common.CommonProxyAutoMine") public static CommonProxyAutoMine proxy; @Instance public AMCore instance; //*Blocks* public static net.minecraft.src.Block alumblock; public static net.minecraft.src.Block alumore; //*Items* public static net.minecraft.src.Item alumingot; @Init public void load(FMLInitializationEvent event) { proxy.registerRenderThings(); //Blocks alumblock = new AlumBlock(3348, 0).setHardness(3F).setResistance(1.0F).setBlockName("alumblock"); GameRegistry.registerBlock(alumblock); LanguageRegistry.addName(alumblock, "Aluminum Block"); GameRegistry.addSmelting(AMCore.alumore.blockID, new ItemStack(AMCore.alumingot), 0.1f); alumore = new AlumBlock(3349, 1).setHardness(3F).setResistance(1.0F).setBlockName("alumore"); GameRegistry.registerBlock(alumore); LanguageRegistry.addName(alumore, "Aluminum Ore"); GameRegistry.registerWorldGenerator(new AMWorldGen()); //Items alumingot = new AlumIngot(3400).setIconIndex(0).setItemName("alumingot"); LanguageRegistry.addName(alumingot, "Aluminum Ingot"); } } Usually when I get a crash report I know what's wrong but this one confuses me. Any help and/or feedback is greatly apreciated.
October 21, 201213 yr at automine.common.AMCore.load(AMCore.java:45) Something on that line is null. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 26, 201213 yr Initialize all of your blocks and items before you add recipes. If it helps, this is line 45: GameRegistry.addSmelting(AMCore.alumore.blockID, new ItemStack(AMCore.alumingot), 0.1f); There's an EAQ for a reason. Read it! "Note that failure to read this will make you look idiotic. You don't want that do you?" -- luacs1998 First rule of bug reports: More information is always better. Oh, and logs OR IT DIDN'T HAPPEN!!
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.