Posted February 27, 201411 yr Hello guys. Every time when I start Minecraft it crashed with an NullPointerException. Error: java.lang.NullPointerException: Initializing game at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:242) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:112) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:242) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:112) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation Memory: 30986216 bytes (29 MB) / 130965504 bytes (124 MB) up to 259522560 bytes (247 MB) JVM Flags: 0 total; AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized addonplusplus{Alpha 0.0.6} [AddonPlus+] (bin) Unloaded->Constructed->Errored primevalforest{Alpha 0.0.8} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1) Code: protected static void addRecipesForCraftingTable () { //if(Loader.isModLoaded("mod_cobalt")) //{ GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltingot }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltingot }); //} } I'm using Java Version: 1.7.0_51 and Minecraft Version: 1.7.2 and Minecraft Forge 10.12.0.1024. I hope that you can help me. Bektor Developer of Primeval Forest.
February 27, 201411 yr Author Here is the full code of the method that makes the problem (well there are more errors, but this errors are only problems, because they load this method and then it crashed) protected static void addRecipesForCraftingTable () { //if(Loader.isModLoaded("mod_cobalt")) //{ GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltingot }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltingot }); //} } Developer of Primeval Forest.
February 27, 201411 yr Author package minecraftplaye.addonplusplus.recipe; import java.util.List; import cobaltmod.api.CMStuff; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class ARecipes { public ARecipes() { addRecipesForCraftingTable(); } public static void registerBlockRecipes () { // Tool Tables // Smeltery stuff // Traps // fluids // Decoration // Ores // Glass // Rail } public static void registerItemRecipes () { } public void addOreDictionarySmelteryRecipes () { } protected static void addRecipesForToolBuilder () { } protected static void addPartMapping () { } protected static void addRecipesForTableCasting () { } protected static void addRecipesForFurnace () { } protected static void addRecipesForCraftingTable () { //if(Loader.isModLoaded("mod_cobalt")) //{ GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltwood }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltingot }); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), new Object[] { "cc#", "cc#", "cc#", Character.valueOf('c'), CMStuff.cobaltingot }); //} } protected static void addRecipesForDryingRack () { } protected static void addRecipesForChisel () { } public void oreRegistry() { } public void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray) { } public void modRecipesRemover() { if(!ARepo.initRecipes) { ARepo.initRecipes = true; RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.iron_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.gold_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.diamond_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.emerald_block)); if(Loader.isModLoaded("mod_Cobalt")) { //RecipeRemover.removeAnyRecipe(new ItemStack(CMStuff.cobaltaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_pickaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_axe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_shovel)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_hoe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_sword)); } } } protected static void addRecipesForSmeltery () { } public void modIntegration () { } Developer of Primeval Forest.
February 27, 201411 yr GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), new Object[] { "#cc", "#cc", "#cc", Character.valueOf('c'), CMStuff.cobaltwood }); Uh. You know that blank spaces in the crafting grid are defined with SPACES right? The crafting manager is trying to figure out what the # means and can't find it. Also you don't need to do new Object[] because of the way the recieving function is programmed: addRecipe(ItemStack result, Object...) That ... means that any parameters beyond the specified ones are already accessible as an array. GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), " cc", " cc", " cc", Character.valueOf('c'), CMStuff.cobaltwood); BAM. Also, that "character of" bit can also be removed. In Java 'c' is a character already (whereas "c" is a string). Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 27, 201411 yr Author Same error. Error: java.lang.NullPointerException: Initializing game at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:242) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:112) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:242) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:112) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation Memory: 30765272 bytes (29 MB) / 131014656 bytes (124 MB) up to 259522560 bytes (247 MB) JVM Flags: 0 total; AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized addonplusplus{Alpha 0.0.6} [AddonPlus+] (bin) Unloaded->Constructed->Errored primevalforest{Alpha 0.0.8} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1) The new code: package minecraftplaye.addonplusplus.recipe; import java.util.List; import cobaltmod.api.CMStuff; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class ARecipes { public ARecipes() { addRecipesForCraftingTable(); } public static void registerBlockRecipes () { // Tool Tables // Smeltery stuff // Traps // fluids // Decoration // Ores // Glass // Rail } public static void registerItemRecipes () { } public void addOreDictionarySmelteryRecipes () { } protected static void addRecipesForToolBuilder () { } protected static void addPartMapping () { } protected static void addRecipesForTableCasting () { } protected static void addRecipesForFurnace () { } protected static void addRecipesForCraftingTable () { //if(Loader.isModLoaded("mod_cobalt")) //{ GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), " ##", " ##", " ##", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "## ", "## ", "## ", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), " ##", " ##", " ##", Character.valueOf('#'), CMStuff.cobaltingot); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1),"## ", "## ", "## ", Character.valueOf('#'), CMStuff.cobaltingot); //} } protected static void addRecipesForDryingRack () { } protected static void addRecipesForChisel () { } public void oreRegistry() { } public void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray) { } public void modRecipesRemover() { if(!ARepo.initRecipes) { ARepo.initRecipes = true; RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.iron_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.gold_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.diamond_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.emerald_block)); if(Loader.isModLoaded("mod_Cobalt")) { //RecipeRemover.removeAnyRecipe(new ItemStack(CMStuff.cobaltaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_pickaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_axe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_shovel)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_hoe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_sword)); } } } protected static void addRecipesForSmeltery () { } public void modIntegration () { } } Oh and without the Character.valueOf I get the same error and without the SPACES the same error appears again. Developer of Primeval Forest.
February 27, 201411 yr Author If you want to add a two-wide recipe, do it like this: ## ## ## and not _## _## _## (with _ being a space). Same error. Developer of Primeval Forest.
February 27, 201411 yr Show your main class. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 27, 201411 yr Author Show your main class. package minecraftplaye.addonplusplus; import minecraftplaye.addonplusplus.blocks.AContent; import minecraftplaye.addonplusplus.helpers.ACreative; import minecraftplaye.addonplusplus.recipe.ARecipes; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @Mod(modid = AddonPlusPlus.ID, name = AddonPlusPlus.NAME, version = AddonPlusPlus.VERSION, dependencies = "required-after:Forge@[10.12.0.1024,);after:mod_Cobalt@[1.5,)") public class AddonPlusPlus { /** Important things */ public static final String ID = "addonplusplus"; public static final String NAME = "AddonPlus+"; public static final String VERSION = "Alpha 0.0.6"; /** Classes */ public static ARecipes recipes; public static AContent content; public static ACreative acrea; @Instance("cobaltaddon") public static AddonPlusPlus instance; @SidedProxy(clientSide = "minecraftplaye.addonplusplus.AClientProxy", serverSide = "minecraftplaye.addonplusplus.ACommonProxy") public static ACommonProxy proxy; /** Config File */ public static String configPath; public AddonPlusPlus() { instance = this; // Checks if the Cobalt Mod is loaded! //if(Loader.isModLoaded("mod_Cobalt")) //{ //} //else {} } @EventHandler public void preInit(FMLPreInitializationEvent event) { /** Config */ configPath = event.getModConfigurationDirectory() + "/addonplusplus/"; // classes content = new AContent(); acrea = new ACreative(); recipes = new ARecipes(); recipes.oreRegistry(); } @EventHandler public void load(FMLInitializationEvent event) { } @EventHandler public static void postInit(FMLPostInitializationEvent event) { recipes.modIntegration(); recipes.addOreDictionarySmelteryRecipes(); recipes.modRecipesRemover(); } } Developer of Primeval Forest.
February 27, 201411 yr Don't register your recipes in preInit. Because of the way you've structured your mod, you can't insure that the class that is creating the blocks has created and registered them yet. Move your recipes to Init or PostInit. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 28, 201411 yr Author Same problems. ---- Minecraft Crash Report ---- // Sorry Time: 28.02.14 19:21 Description: Initializing game java.lang.NullPointerException: Initializing game at net.minecraft.item.crafting.CraftingManager.func_92103_a(CraftingManager.java:234) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:495) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:850) at net.minecraft.client.main.Main.main(SourceFile:103) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.crafting.CraftingManager.func_92103_a(CraftingManager.java:234) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:214) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:209) at minecraftplaye.addonplusplus.recipe.ARecipes.addRecipesForCraftingTable(ARecipes.java:70) at minecraftplaye.addonplusplus.recipe.ARecipes.<init>(ARecipes.java:20) at minecraftplaye.addonplusplus.AddonPlusPlus.preInit(AddonPlusPlus.java:59) 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:536) 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:47) 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.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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:47) 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:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:498) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:495) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:850) at net.minecraft.client.main.Main.main(SourceFile:103) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 319885968 bytes (305 MB) / 473956352 bytes (452 MB) up to 954728448 bytes (910 MB) JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.2.116.1024} [Forge Mod Loader] (forge-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized Forge{10.12.0.1024} [Minecraft Forge] (forge-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized addonplusplus{Alpha 0.0.6} [AddonPlus+] (addonplusplus-1.7.2-0.0.6.jar) Unloaded->Constructed->Errored mod_cobalt{1.5} [Cobalt Mod] (mod_cobalt-1.7.2-1.5.jar) Unloaded->Constructed->Pre-initialized Launched Version: 1.7.2-Forge10.12.0.1024 LWJGL: 2.9.0 OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (UK) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1) Code: package minecraftplaye.addonplusplus; import minecraftplaye.addonplusplus.blocks.AContent; import minecraftplaye.addonplusplus.helpers.ACreative; import minecraftplaye.addonplusplus.recipe.ARecipes; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @Mod(modid = AddonPlusPlus.ID, name = AddonPlusPlus.NAME, version = AddonPlusPlus.VERSION, dependencies = "required-after:Forge@[10.12.0.1024,);after:mod_Cobalt@[1.5,)") public class AddonPlusPlus { /** Important things */ public static final String ID = "addonplusplus"; public static final String NAME = "AddonPlus+"; public static final String VERSION = "Alpha 0.0.6"; /** Classes */ public static ARecipes recipes; public static AContent content; public static ACreative acrea; @Instance("cobaltaddon") public static AddonPlusPlus instance; @SidedProxy(clientSide = "minecraftplaye.addonplusplus.AClientProxy", serverSide = "minecraftplaye.addonplusplus.ACommonProxy") public static ACommonProxy proxy; /** Config File */ public static String configPath; public AddonPlusPlus() { instance = this; // Checks if the Cobalt Mod is loaded! //if(Loader.isModLoaded("mod_Cobalt")) //{ //} //else {} } @EventHandler public void preInit(FMLPreInitializationEvent event) { /** Config */ configPath = event.getModConfigurationDirectory() + "/addonplusplus/"; // classes content = new AContent(); acrea = new ACreative(); recipes = new ARecipes(); recipes.oreRegistry(); recipes.modIntegration(); recipes.addOreDictionarySmelteryRecipes(); recipes.modRecipesRemover(); } @EventHandler public void load(FMLInitializationEvent event) { } @EventHandler public static void postInit(FMLPostInitializationEvent event) { } } package minecraftplaye.addonplusplus.recipe; import java.util.List; import cobaltmod.api.CMStuff; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class ARecipes { public ARecipes() { addRecipesForCraftingTable(); } public static void registerBlockRecipes () { // Tool Tables // Smeltery stuff // Traps // fluids // Decoration // Ores // Glass // Rail } public static void registerItemRecipes () { } public void addOreDictionarySmelteryRecipes () { } protected static void addRecipesForToolBuilder () { } protected static void addPartMapping () { } protected static void addRecipesForTableCasting () { } protected static void addRecipesForFurnace () { } protected static void addRecipesForCraftingTable () { if(Loader.isModLoaded("mod_cobalt")) { GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "_##", "_ ##", "_ ##", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "##_", "##_", "##_ ", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), "_ ##", "_##", "_##", Character.valueOf('#'), CMStuff.cobaltingot); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1),"##_", "##_", "##_", Character.valueOf('#'), CMStuff.cobaltingot); } } protected static void addRecipesForDryingRack () { } protected static void addRecipesForChisel () { } public void oreRegistry() { } private static void ensureOreIsRegistered (String oreName, ItemStack is) { int oreId = OreDictionary.getOreID(is); if (oreId == -1) { OreDictionary.registerOre(oreName, is); } } public void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray) { } public void modRecipesRemover() { if(!ARepo.initRecipes) { ARepo.initRecipes = true; RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.iron_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.gold_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.diamond_block)); RecipeRemover.removeAnyRecipe(new ItemStack(Blocks.emerald_block)); if(Loader.isModLoaded("mod_Cobalt")) { //RecipeRemover.removeAnyRecipe(new ItemStack(CMStuff.cobaltaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_pickaxe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_axe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_shovel)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_hoe)); RecipeRemover.removeAnyRecipe(new ItemStack(Items.wooden_sword)); } } } protected static void addRecipesForSmeltery () { } public void modIntegration () { } } package minecraftplaye.addonplusplus.blocks; import net.minecraft.block.material.Material; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import minecraftplaye.addonplusplus.AddonPlusPlus; import minecraftplaye.addonplusplus.items.ItemCobaltDoor; import minecraftplaye.addonplusplus.recipe.ARecipes; import minecraftplaye.addonplusplus.recipe.ARepo; public class AContent { public AContent() { registerItems(); ARecipes.registerItemRecipes(); registerBlocks(); ARecipes.registerBlockRecipes(); registerMaterials(); //addCraftingRecipes(); //setupToolTabs(); //addLoot(); //if (PHConstruct.achievementsEnabled) //{ //addAchievements(); //} } void registerBlocks () { if(Loader.isModLoaded("mod_cobalt")) { ARepo.cobaltVine = new CobaltVine().setBlockName("cobaltVine"); ARepo.cobaltDoor = new CobaltDoor(Material.wood).setBlockName("cobaltDoor").setBlockTextureName("cobaltDoor"); ARepo.ironCobalt_door = new CobaltDoor(Material.iron).setBlockName("ironCobalt_door").setBlockTextureName("ironCobalt_door"); //CARepo.cobaltWater = new CobaltWater(); GameRegistry.registerBlock(ARepo.cobaltVine, "cobaltVine"); GameRegistry.registerBlock(ARepo.cobaltDoor, "cobaltDoor"); GameRegistry.registerBlock(ARepo.ironCobalt_door, "ironCobalt_door"); } } void registerItems () { if(Loader.isModLoaded("mod_cobalt")) { ARepo.ICobalt_door = new ItemCobaltDoor(Material.wood).setUnlocalizedName("doorWood").setTextureName(AddonPlusPlus.ID + "cobaltDoor"); ARepo.IIronCobalt_door = new ItemCobaltDoor(Material.iron).setUnlocalizedName("ironCobalt_door").setTextureName(AddonPlusPlus.ID + "ironCobalt_door"); GameRegistry.registerItem(ARepo.ICobalt_door, "doorWood"); GameRegistry.registerItem(ARepo.IIronCobalt_door, "ironCobalt_door"); } } void registerMaterials () { } } package minecraftplaye.addonplusplus.recipe; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.fluids.Fluid; public class ARepo { // Patterns and other materials // Tools // Tool parts // Crafting blocks // Decoration // Traps // InfiBlocks public static Block cobaltVine; public static Block cobaltDoor; public static Block ironCobalt_door; // Liquids public static Fluid cobaltWater; public static Fluid cobaltLava; // Glue // Ores // Tool modifiers // Rail-related // Chest hooks // Armor - basic // Armor - exosuit // Item stuff public static Item ICobalt_door; public static Item IIronCobalt_door; // recipe stuff public static boolean thaumcraftAvailable; public static boolean initRecipes; } Here is the API that I used from the Mod CobaltMod (the API isn't published yet, because the developer will now if its work and yes, the api isn't so optimal, but the mod developer and I havn't an idea, how a method must look, that the items and blocks must not public in an api....) package cobaltmod.api; //import cobaltmod.blocks.BlockBlueFire; //import cobaltmod.blocks.BlockCobaltPortal; import com.google.common.base.Optional; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; public enum CMStuff { INSTANCE; public static ToolMaterial CobaltOreTool; public static ToolMaterial CobaltWoodTool; public static ToolMaterial MagicRodTool; public static ArmorMaterial CobaltOreArmor; //Blocks public static Block cobaltore; public static Block cobaltgrass; public static Block cobaltblock; public static Block cobaltlog; public static Block cobaltwood; public static Block cobaltleaves; public static Block cobaltsapling; public static Block cobaltsingleslab; public static Block cobaltdoubleslab; public static Block clematisflower; public static Block redcabbagecrop; public static Block cobaltbrick; public static Block cobaltbrickstair; public static Block cobaltstone; //public static BlockCobaltPortal cobaltportal; public static Block cobalttorch; public static Block blueberrybushfull; public static Block blueberrybushempty; public static Block ritualstone; public static Block altarofassociation; public static Block cobaltwoodstair; public static Block cobaltwoodsingleslab; public static Block cobaltwooddoubleslab; //public static BlockBlueFire bluefire; public static Block bellflower; public static Block bouncycobalt; public static Block cobaltfurnaceidle; public static Block cobaltfurnaceburning; public static Block cobaltchest; //Items public static Item cobaltpickaxe; public static Item cobaltaxe; public static Item cobaltshovel; public static Item cobaltsword; public static Item cobalthoe; public static Item cobaltingot; public static Item cobaltapple; public static Item cobaltdust; public static Item cobaltstick; public static Item cobaltbow; public static Item cobaltarrow; public static Item redcabbageseeds; public static Item redcabbage; public static Item redcabbagejuice; public static Item cocktailglass; public static Item cobalthelmet; public static Item cobaltplate; public static Item cobaltlegs; public static Item cobaltboots; public static Item cobaltnugget; public static Item cobaltwoodpickaxe; public static Item cobaltwoodaxe; public static Item cobaltwoodshovel; public static Item cobaltwoodsword; public static Item cobaltwoodhoe; public static Item recipebook; public static Item foenumstaff; public static Item njossstaff; public static Item foenumcrystal; public static Item njosscrystal; public static Item cobaltstonefragment; public static Item cobaltstonecrystal; public static Item blueessence; public static Item greenessence; public static Item blueberry; public static Item cobaltfertilizer; public static Item fireshard; } Developer of Primeval Forest.
February 28, 201411 yr Hi Are you sure you're using Forge version 1024? In my version 1024, there is no func_92103_a and my CraftingManager.java:234 doesn't match yours But anyway, I'm pretty certain that your CMSstuff.cobaltwood or CMSstuff.cobaltingot is still null at the point you construct your ARecipes. Do you know how to use the integrated debugger? (Breakpoints and watches etc)? If so, I'd suggest you put a breakpoint in your addRecipesForCraftingTable and inspect the values of cobaltwood and cobaltingot. (If you don't know... it's well worth your time spending a couple of hours to learn, I reckon) http://www.vogella.com/tutorials/EclipseDebugging/article.html or https://www.jetbrains.com/idea/webhelp/debugging.html and -TGG
February 28, 201411 yr As Draco18s has told you, don't put anything in the crafting strings that you don't explain except spaces ' ' or " ". They are the only things that provide empty ness, not "_" or any other wierd character. If the grid has "A A" " B " and " C ", then you must have the characters 'A', 'B', and 'C' after the string and before an Item. If you use '#' in the grid, then you must use that before an Item, same with '_'. The craftingManager cannot read your mind! You still have this? GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "_##", "_ ##", "_ ##", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "##_", "##_", "##_ ", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), "_ ##", "_##", "_##", Character.valueOf('#'), CMStuff.cobaltingot); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1),"##_", "##_", "##_", Character.valueOf('#'), CMStuff.cobaltingot); Change the underscores to spaces. Or, get rid of the entirely. You don't need them. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
March 1, 201411 yr Author As Draco18s has told you, don't put anything in the crafting strings that you don't explain except spaces ' ' or " ". They are the only things that provide empty ness, not "_" or any other wierd character. If the grid has "A A" " B " and " C ", then you must have the characters 'A', 'B', and 'C' after the string and before an Item. If you use '#' in the grid, then you must use that before an Item, same with '_'. The craftingManager cannot read your mind! You still have this? GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "_##", "_ ##", "_ ##", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "##_", "##_", "##_ ", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), "_ ##", "_##", "_##", Character.valueOf('#'), CMStuff.cobaltingot); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1),"##_", "##_", "##_", Character.valueOf('#'), CMStuff.cobaltingot); Change the underscores to spaces. Or, get rid of the entirely. You don't need them. Well I've tested it with "_" and without "_". Oh and with normal spaces: " " I've tested it too. Developer of Primeval Forest.
March 1, 201411 yr Author Hi Are you sure you're using Forge version 1024? In my version 1024, there is no func_92103_a and my CraftingManager.java:234 doesn't match yours But anyway, I'm pretty certain that your CMSstuff.cobaltwood or CMSstuff.cobaltingot is still null at the point you construct your ARecipes. Do you know how to use the integrated debugger? (Breakpoints and watches etc)? If so, I'd suggest you put a breakpoint in your addRecipesForCraftingTable and inspect the values of cobaltwood and cobaltingot. (If you don't know... it's well worth your time spending a couple of hours to learn, I reckon) http://www.vogella.com/tutorials/EclipseDebugging/article.html or https://www.jetbrains.com/idea/webhelp/debugging.html and -TGG Ok, I had used now the debugger and the line "if(Loader.isModLoaded("mod_cobalt"))" was marked and Minecraft got a black screen. Well, "CMSstuff.cobaltingot" is still null I think, because this items and blocks are not from my mod and I have only the API from this mod. But if I have recompiled it, that I have my mod as a .jar and the other mods and if I run with both Minecraft, the error appears again, but then "CMSstuff.cobaltingot" isn't null, because the other mod use and register it then. Oh and I had used Forge version 1024 but then I updated to Forge 10.12.0.1032 for some reasons, but with both versions, this error appears. Developer of Primeval Forest.
March 1, 201411 yr Unless you post the new log with the new code, there is no way for us to surmise what problems remain. So, post the latest crash log with your code that causes it. Then you will get more help. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
March 1, 201411 yr Author The code and the crash is the same as befor. I tested only some new method with the CraftingManager, but I removed this methods again, because the same crash appeard. Well with I tested some new methods, I mean that I tested everything what all of you guys wanted that I use this method and test it then to see if the error is there then too. Developer of Primeval Forest.
March 1, 201411 yr Why the **** do you have 4 characters? _ ## Underscore, space, numbersign, numbersign?
March 3, 201411 yr Author Why the **** do you have 4 characters? _ ## Underscore, space, numbersign, numbersign? Where see you the "****"? And what did you mean with "Underscore, space, numbersign, numbersign?"? Developer of Primeval Forest.
March 3, 201411 yr So you went back to square one, which you knew did not work. Now, you expect us to glean something more from those old crashlogs? I'm pretty sure that you've ignored all of our help, you won't get much more. Learn from what you've been told and try the results (with new logs and code) or fix it yourself. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
March 3, 201411 yr Why the **** do you have 4 characters? _ ## Underscore, space, numbersign, numbersign? Where see you the "****"? And what did you mean with "Underscore, space, numbersign, numbersign?"? The four asterisks were meant to censor a swear, they were not in the code.
March 4, 201411 yr Author So you went back to square one, which you knew did not work. Now, you expect us to glean something more from those old crashlogs? I'm pretty sure that you've ignored all of our help, you won't get much more. Learn from what you've been told and try the results (with new logs and code) or fix it yourself. Here is the code and the new log: https://www.dropbox.com/sh/jc4b0brt5mihx5i/xEvZEYXiN9 I hope that you can help me know. Developer of Primeval Forest.
March 4, 201411 yr { GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "_##", "_ ##", "_ ##", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.ICobalt_door, 1), "##_", "##_", "##_ ", Character.valueOf('#'), CMStuff.cobaltwood); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1), "_##", "_##", "_##", Character.valueOf('#'), CMStuff.cobaltingot); GameRegistry.addRecipe(new ItemStack(ARepo.IIronCobalt_door, 1),"##_", "##_", "##_", Character.valueOf('#'), CMStuff.cobaltingot); } Here is your problem. ^ The crafting grid is not correctly created in any of these recipes. a. Only spaces and items go in the grid. Spaces are for alignment and structure. Nothing else. b. You have underscores: They are not items and therefore do not belong in the grid. Nothing except spaces (for structure.) No underscores '_' allowed for this. c. Your first recipe has 4 character wide strings. This will not give you the recipe you expect. Make all strings the same length (length of string <= 3 and all match). d. You are registering recipes in 'preinit'. In 1.7.2, this should be done in 'init'. Fix those and the problem goes away. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.