Jump to content

[1.7.2 - FIXED] Crafting Error NullPointerException


Bektor

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

    		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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

        {
            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.

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm developing a dimension, but it's kinda resource intensive so some times during player teleporting it lags behind making the player phase down into the void, so im trying to implement some kind of pregeneration to force the game loading a small set of chunks in the are the player will teleport to. Some of the things i've tried like using ServerLevel and ServerChunkCache methods like getChunk() dont actually trigger chunk generation if the chunk isn't already on persistent storage (already generated) or placing tickets, but that doesn't work either. Ideally i should be able to check when the task has ended too. I've peeked around some pregen engines, but they're too complex for my current understanding of the system of which I have just a basic understanding (how ServerLevel ,ServerChunkCache  and ChunkMap work) of. Any tips or other classes I should be looking into to understand how to do this correctly?
    • https://mclo.gs/4UC49Ao
    • Way back in the Forge 1.17 days, work started for adding JPMS (Java Platform Module Support) to ModLauncher and ForgeModLoader. This has been used internally by Forge and some libraries for a while now, but mods (those with mods.toml specifically) have not been able to take advantage of it. As of Forge 1.21.1 and 1.21.3, this is now possible!   What is JPMS and what does it mean for modders? JPMS is the Java Platform Module System, introduced in Java 9. It allows you to define modules, which are collections of packages and resources that can be exported or hidden from other modules. This allows for much more fine-tuned control over visibility, cleaner syntax for service declarations and support for sealed types across packages. For example, you might have a mod with a module called `com.example.mod` that exports `com.example.mod.api` and `com.example.mod.impl` to other mods, but hides `com.example.mod.internal` from them. This would allow you to have a clean API for other mods to use, while keeping your internal implementation details hidden from IDE hints, helping prevent accidental usage of internals that might break without prior notice. This is particularly useful if you'd like to use public records with module-private constructors or partially module-private record components, as you can create a sealed interface that only your record implements, having the interface be exported and the record hidden. It's also nice for declaring and using services, as you'll get compile-time errors from the Java compiler for typos and the like, rather than deferring to runtime errors. In more advanced cases, you can also have public methods that are only accessible to specific other modules -- handy if you want internal interactions between multiple of your own mods.   How do I bypass it? We understand there may be drama in implementing a system that prevents mods from accessing each other's internals when necessary (like when a mod is abandoned or you need to fix a compat issue) -- after all, we are already modding a game that doesn't have explicit support for Java mods yet. We have already thought of this and are offering APIs from day one to selectively bypass module restrictions. Let me be clear: Forge mods are not required to use JPMS. If you don't want to use it, you don't have to. The default behaviour is to have fully open, fully exported automatic modules. In Java, you can use the `Add-Opens` and `Add-Exports` manifest attributes to selectively bypass module restrictions of other mods at launch time, and we've added explicit support for these when loading your Forge mods. At compile-time, you can use existing solutions such as the extra-java-module-info Gradle plugin to deal with non-modular dependencies and add extra opens and exports to other modules. Here's an example on how to make the internal package `com.example.examplemod.internal` open to your mod in your build.gradle: tasks.named('jar', Jar) { manifest { attributes([ 'Add-Opens' : 'com.example.examplemod/com.example.examplemod.internal' 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors // (...) ]) } } With the above in your mod's jar manifest, you can now reflectively access the classes inside that internal package. Multiple entries are separated with a space, as per Java's official spec. You can also use Add-Exports to directly call without reflection, however you'd need to use the Gradle plugin mentioned earlier to be able to compile. The syntax for Add-Exports is the same as Add-Opens, and instructions for the compile-time step with the Gradle plugin are detailed later in this post. Remember to prefer the opens and exports keywords inside module-info.java for sources you control. The Add-Opens/Add-Exports attributes are only intended for forcing open other mods.   What else is new with module support? Previously, the runtime module name was always forced to the first mod ID in your `mods.toml` file and all packages were forced fully open and exported. Module names are now distinguished from mod IDs, meaning the module name in your module-info.java can be different from the mod ID in your `mods.toml`. This allows you to have a more descriptive module name that doesn't have to be the same as your mod ID, however we strongly recommend including your mod ID as part of your module name to aid troubleshooting. The `Automatic-Module-Name` manifest attribute is now also honoured, allowing you to specify a module name for your mod without needing to create a `module-info.java` file. This is particularly useful for mods that don't care about JPMS features but want to have a more descriptive module name and easier integration with other mods that do use JPMS.   How do I use it? The first step is to create a `module-info.java` file in your mod's source directory. This file should be in the same package as your main mod class, and should look something like this: open module com.example.examplemod { requires net.minecraftforge.eventbus; requires net.minecraftforge.fmlcore; requires net.minecraftforge.forge; requires net.minecraftforge.javafmlmod; requires net.minecraftforge.mergetool.api; requires org.slf4j; requires logging; } For now, we're leaving the whole module open to reflection, which is a good starting point. When we know we want to close something off, we can remove the open modifier from the module and open or export individual packages instead. Remember that you need to be open to Forge (module name net.minecraftforge.forge), otherwise it can't call your mod's constructor. Next is fixing modules in Gradle. While Forge and Java support modules properly, Gradle does not put automatic modules on the module path by default, meaning that the logging module (from com.mojang:logging) is not found. To fix this, add the Gradle plugin and add a compile-time module definition for that Mojang library: plugins { // (...) id 'org.gradlex.extra-java-module-info' version "1.9" } // (...) extraJavaModuleInfo { failOnMissingModuleInfo = false automaticModule("com.mojang:logging", "logging") } The automatic module override specified in your build.gradle should match the runtime one to avoid errors. You can do the same for any library or mod dependency that is missing either a module-info or explicit Automatic-Module-Name, however be aware that you may need to update your mod once said library adds one. That's all you need to get started with module support in your mods. You can learn more about modules and how to use them at dev.java.
    • Faire la mise à jour grâce à ce lien m'a aider personnellement, merci à @Paint_Ninja. https://www.amd.com/en/support 
    • When I came across the 'Exit Code: I got a 1 error in my Minecraft mods, so I decided to figure out what was wrong. First, I took a look at the logs. In the mods folder (usually where you'd find logs or crash reports), I found the latest.log file or the corresponding crash report. I read it through carefully, looking for any lines with errors or warnings. Then I checked the Minecraft Forge support site, where you can often find info on what causes errors and how to fix them. I then disabled half of my mods and tried running the game. If the error disappeared, it meant that the problem was with the disabled mod. I repeated this several times to find the problem mod.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.