Ok, here is the problem. I open up the MC in eclipse, and I get an error report like this:
---- Minecraft Crash Report ----
// Why is it breaking
Time: 5/16/13 6:29 PM
Description: Failed to start game
java.lang.NullPointerException
at cpw.mods.fml.common.registry.GameData.setName(GameData.java:253)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:150)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:138)
at rokkit.customweapons.customWeapons.load(customWeapons.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 968384696 bytes (923 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Here is my main code, let me know if I need any other code:
package rokkit.customweapons;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="CustomWeapons", name="Custom Weapons", version="0.0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class customWeapons {
// The instance of your mod that Forge uses.
@Instance("Custom Weapons")
public static customWeapons instance;
public final static Item SteelIngot = new SteelIngot(213).setMaxStackSize(64).setUnlocalizedName("steelIngot");
public static Item itemBroadsword;
public static Item itemKnife;
public static Item itemSaber;
public static Item itemSpear;
public final static Item SteelDust = new SteelDust(212).setMaxStackSize(64).setUnlocalizedName("steelDust");
public final static Item itemDart = new SteelDust(215).setMaxStackSize(64).setUnlocalizedName("itemDart");
public final static Item ironRod = new SteelDust(216).setMaxStackSize(64).setUnlocalizedName("ironRod");
public final static Item itemStoker = new SteelDust(217).setMaxStackSize(1).setUnlocalizedName("itemStoker");
public final static Item itemSpearhead = new itemSpearhead(220).setMaxStackSize(64).setUnlocalizedName("itemSpearhead");
public final static Item itemSwordBlade = new itemSpearhead(221).setMaxStackSize(64).setUnlocalizedName("itemSwordBlade");
public final static Block steelOre = new SteelOre(211, 1, Material.iron);
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide="rokkit.customweapons.client.ClientProxy", serverSide="rokkit.customweapons.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
GameRegistry.registerItem(customWeapons.itemBroadsword, "Broadsword");
GameRegistry.registerItem(customWeapons.itemKnife, "Knife");
GameRegistry.registerItem(customWeapons.itemSpear, "Spear");
GameRegistry.registerItem(customWeapons.itemSaber, "Saber");
LanguageRegistry.addName(SteelIngot, "Steel Ingot");
LanguageRegistry.addName(itemBroadsword, "Broadsword");
LanguageRegistry.addName(itemKnife, "Knife");
LanguageRegistry.addName(itemSpear, "Spear");
LanguageRegistry.addName(itemSaber, "Saber");
LanguageRegistry.addName(itemStoker, "Stoker");
LanguageRegistry.addName(SteelDust, "Steel Dust");
LanguageRegistry.addName(steelOre, "Steel Ore");
LanguageRegistry.addName(ironRod, "Steel Rod");
LanguageRegistry.addName(itemSpearhead, "Spearhead");
MinecraftForge.setBlockHarvestLevel(steelOre, "pickaxe", 2);
GameRegistry.registerBlock(steelOre, "steelOre");
GameRegistry.addSmelting(customWeapons.SteelDust.itemID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addSmelting(customWeapons.ironRod.itemID, new ItemStack(customWeapons.itemSwordBlade), 0.0f);
GameRegistry.addSmelting(customWeapons.steelOre.blockID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.ironRod, 4), new ItemStack(customWeapons.SteelIngot), new ItemStack(customWeapons.SteelIngot));
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.itemStoker, 1), new ItemStack(customWeapons.ironRod), new ItemStack(customWeapons.ironRod));
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpear), " y", " x ", "x ", 'x', Item.stick, 'y', itemSpearhead);
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpearhead), " xx", " x", " ", 'x', SteelIngot);
ItemStack SteelOre = new ItemStack(customWeapons.steelOre);
ItemStack stick = new ItemStack(Item.stick);
ItemStack SteelDust = new ItemStack(customWeapons.SteelDust);
ItemStack steelIngot = new ItemStack(customWeapons.SteelIngot);
ItemStack itemDart = new ItemStack(customWeapons.itemDart);
ItemStack ironRod = new ItemStack(customWeapons.ironRod);
ItemStack itemSpearhead = new ItemStack(customWeapons.itemSpearhead);
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
}
}
Ok, here is the problem. I open up the MC in eclipse, and I get an error report like this:
---- Minecraft Crash Report ----
// Why is it breaking
Time: 5/16/13 6:29 PM
Description: Failed to start game
java.lang.NullPointerException
at cpw.mods.fml.common.registry.GameData.setName(GameData.java:253)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:150)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:138)
at rokkit.customweapons.customWeapons.load(customWeapons.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 968384696 bytes (923 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Here is my main code, let me know if I need any other code:
package rokkit.customweapons;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="CustomWeapons", name="Custom Weapons", version="0.0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class customWeapons {
// The instance of your mod that Forge uses.
@Instance("Custom Weapons")
public static customWeapons instance;
public final static Item SteelIngot = new SteelIngot(213).setMaxStackSize(64).setUnlocalizedName("steelIngot");
public static Item itemBroadsword;
public static Item itemKnife;
public static Item itemSaber;
public static Item itemSpear;
public final static Item SteelDust = new SteelDust(212).setMaxStackSize(64).setUnlocalizedName("steelDust");
public final static Item itemDart = new SteelDust(215).setMaxStackSize(64).setUnlocalizedName("itemDart");
public final static Item ironRod = new SteelDust(216).setMaxStackSize(64).setUnlocalizedName("ironRod");
public final static Item itemStoker = new SteelDust(217).setMaxStackSize(1).setUnlocalizedName("itemStoker");
public final static Item itemSpearhead = new itemSpearhead(220).setMaxStackSize(64).setUnlocalizedName("itemSpearhead");
public final static Item itemSwordBlade = new itemSpearhead(221).setMaxStackSize(64).setUnlocalizedName("itemSwordBlade");
public final static Block steelOre = new SteelOre(211, 1, Material.iron);
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide="rokkit.customweapons.client.ClientProxy", serverSide="rokkit.customweapons.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
GameRegistry.registerItem(customWeapons.itemBroadsword, "Broadsword");
GameRegistry.registerItem(customWeapons.itemKnife, "Knife");
GameRegistry.registerItem(customWeapons.itemSpear, "Spear");
GameRegistry.registerItem(customWeapons.itemSaber, "Saber");
LanguageRegistry.addName(SteelIngot, "Steel Ingot");
LanguageRegistry.addName(itemBroadsword, "Broadsword");
LanguageRegistry.addName(itemKnife, "Knife");
LanguageRegistry.addName(itemSpear, "Spear");
LanguageRegistry.addName(itemSaber, "Saber");
LanguageRegistry.addName(itemStoker, "Stoker");
LanguageRegistry.addName(SteelDust, "Steel Dust");
LanguageRegistry.addName(steelOre, "Steel Ore");
LanguageRegistry.addName(ironRod, "Steel Rod");
LanguageRegistry.addName(itemSpearhead, "Spearhead");
MinecraftForge.setBlockHarvestLevel(steelOre, "pickaxe", 2);
GameRegistry.registerBlock(steelOre, "steelOre");
GameRegistry.addSmelting(customWeapons.SteelDust.itemID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addSmelting(customWeapons.ironRod.itemID, new ItemStack(customWeapons.itemSwordBlade), 0.0f);
GameRegistry.addSmelting(customWeapons.steelOre.blockID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.ironRod, 4), new ItemStack(customWeapons.SteelIngot), new ItemStack(customWeapons.SteelIngot));
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.itemStoker, 1), new ItemStack(customWeapons.ironRod), new ItemStack(customWeapons.ironRod));
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpear), " y", " x ", "x ", 'x', Item.stick, 'y', itemSpearhead);
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpearhead), " xx", " x", " ", 'x', SteelIngot);
ItemStack SteelOre = new ItemStack(customWeapons.steelOre);
ItemStack stick = new ItemStack(Item.stick);
ItemStack SteelDust = new ItemStack(customWeapons.SteelDust);
ItemStack steelIngot = new ItemStack(customWeapons.SteelIngot);
ItemStack itemDart = new ItemStack(customWeapons.itemDart);
ItemStack ironRod = new ItemStack(customWeapons.ironRod);
ItemStack itemSpearhead = new ItemStack(customWeapons.itemSpearhead);
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
}
}
Thanks in advance!
Are your proxies names: ClientProxy and CommonProxy? If not, add your entire proxy name to it. (:
One thing i see wrong is your instance. You instance has to be the same as your modid. Which means you have to take the space out between the instance. (:
---- Minecraft Crash Report ----
// Ouch. That hurt
Time: 5/17/13 12:54 PM
Description: Failed to start game
java.lang.NullPointerException
at cpw.mods.fml.common.registry.GameData.setName(GameData.java:253)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:150)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:138)
at rokkit.customweapons.customWeapons.load(customWeapons.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 967592880 bytes (922 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
package rokkit.customweapons;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="CustomWeapons", name="Custom Weapons", version="0.0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class customWeapons {
// The instance of your mod that Forge uses.
@Instance("CustomWeapons")
public static customWeapons instance;
public final static Item SteelIngot = new SteelIngot(213).setMaxStackSize(64).setUnlocalizedName("steelIngot");
public final static Item SteelDust = new SteelDust(212).setMaxStackSize(64).setUnlocalizedName("steelDust");
public final static Item itemDart = new SteelDust(215).setMaxStackSize(64).setUnlocalizedName("itemDart");
public final static Item ironRod = new SteelDust(216).setMaxStackSize(64).setUnlocalizedName("ironRod");
public final static Item itemStoker = new SteelDust(217).setMaxStackSize(1).setUnlocalizedName("itemStoker");
public final static Item itemSpearhead = new itemSpearhead(220).setMaxStackSize(64).setUnlocalizedName("itemSpearhead");
public final static Item itemSwordBlade = new itemSpearhead(221).setMaxStackSize(64).setUnlocalizedName("itemSwordBlade");
public final static Block steelOre = new SteelOre(211, 1, Material.iron);
public static Item itemBroadsword;
public static Item itemKnife;
public static Item itemSaber;
public static Item itemSpear;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide="rokkit.customweapons.client.ClientProxy", serverSide="rokkit.customweapons.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
GameRegistry.registerItem(customWeapons.itemBroadsword, "Broadsword");
GameRegistry.registerItem(customWeapons.itemKnife, "Knife");
GameRegistry.registerItem(customWeapons.itemSpear, "Spear");
GameRegistry.registerItem(customWeapons.itemSaber, "Saber");
LanguageRegistry.addName(SteelIngot, "Steel Ingot");
LanguageRegistry.addName(itemBroadsword, "Broadsword");
LanguageRegistry.addName(itemKnife, "Knife");
LanguageRegistry.addName(itemSpear, "Spear");
LanguageRegistry.addName(itemSaber, "Saber");
LanguageRegistry.addName(itemStoker, "Stoker");
LanguageRegistry.addName(SteelDust, "Steel Dust");
LanguageRegistry.addName(steelOre, "Steel Ore");
LanguageRegistry.addName(ironRod, "Steel Rod");
LanguageRegistry.addName(itemSpearhead, "Spearhead");
MinecraftForge.setBlockHarvestLevel(steelOre, "pickaxe", 2);
GameRegistry.registerBlock(steelOre, "steelOre");
GameRegistry.addSmelting(customWeapons.SteelDust.itemID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addSmelting(customWeapons.ironRod.itemID, new ItemStack(customWeapons.itemSwordBlade), 0.0f);
GameRegistry.addSmelting(customWeapons.steelOre.blockID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.ironRod, 4), new ItemStack(customWeapons.SteelIngot), new ItemStack(customWeapons.SteelIngot));
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.itemStoker, 1), new ItemStack(customWeapons.ironRod), new ItemStack(customWeapons.ironRod));
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpear), " y", " x ", "x ", 'x', Item.stick, 'y', itemSpearhead);
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpearhead), " xx", " x", " ", 'x', SteelIngot);
ItemStack SteelOre = new ItemStack(customWeapons.steelOre);
ItemStack stick = new ItemStack(Item.stick);
ItemStack SteelDust = new ItemStack(customWeapons.SteelDust);
ItemStack steelIngot = new ItemStack(customWeapons.SteelIngot);
ItemStack itemDart = new ItemStack(customWeapons.itemDart);
ItemStack ironRod = new ItemStack(customWeapons.ironRod);
ItemStack itemSpearhead = new ItemStack(customWeapons.itemSpearhead);
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
}
}
Crash MSG:
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 5/17/13 1:45 PM
Description: Failed to start game
java.lang.NullPointerException
at cpw.mods.fml.common.registry.GameData.setName(GameData.java:253)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:150)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:138)
at rokkit.customweapons.customWeapons.load(customWeapons.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 969922112 bytes (924 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
GameRegistry.registerItem calls GameData.setName, which attempts to access the integer field item.itemID, which is not initialized until the item is instantiated, resulting in a NullPointerException.
---- Minecraft Crash Report ----
// I'm sorry, Dave.
Time: 5/22/13 2:53 PM
Description: Failed to start game
java.lang.IllegalArgumentException: Illegal object for naming null
at cpw.mods.fml.common.registry.LanguageRegistry.addNameForObject(LanguageRegistry.java:112)
at cpw.mods.fml.common.registry.LanguageRegistry.addName(LanguageRegistry.java:120)
at rokkit.customweapons.customWeapons.load(customWeapons.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 957376384 bytes (913 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
I am checking something quickly, be back soon!Ok, so I fixed that error. Still getting the old one.
Here is the new code should it help:
package rokkit.customweapons;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="CustomWeapons", name="Custom Weapons", version="0.0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class customWeapons {
// The instance of your mod that Forge uses.
@Instance("CustomWeapons")
public static customWeapons instance;
public final static Item SteelIngot = new SteelIngot(213).setMaxStackSize(64).setUnlocalizedName("steelIngot");
public final static Item SteelDust = new SteelDust(212).setMaxStackSize(64).setUnlocalizedName("steelDust");
public final static Item itemDart = new SteelDust(215).setMaxStackSize(64).setUnlocalizedName("itemDart");
public final static Item ironRod = new SteelDust(216).setMaxStackSize(64).setUnlocalizedName("ironRod");
public final static Item itemStoker = new SteelDust(217).setMaxStackSize(1).setUnlocalizedName("itemStoker");
public final static Item itemSpearhead = new itemSpearhead(220).setMaxStackSize(64).setUnlocalizedName("itemSpearhead");
public final static Item itemSwordBlade = new itemSpearhead(221).setMaxStackSize(64).setUnlocalizedName("itemSwordBlade");
public final static Block steelOre = new SteelOre(211, 1, Material.iron);
public static Item itemBroadsword;
public static Item itemKnife;
public static Item itemSaber;
public static Item itemSpear;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide="rokkit.customweapons.client.ClientProxy", serverSide="rokkit.customweapons.CommonProxy")
public static CommonProxy proxy;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
LanguageRegistry.addName(SteelIngot, "Steel Ingot");
//LanguageRegistry.addName(itemBroadsword, "Broadsword");
//LanguageRegistry.addName(itemKnife, "Knife");
//LanguageRegistry.addName(itemSpear, "Spear");
//LanguageRegistry.addName(itemSaber, "Saber");
LanguageRegistry.addName(itemStoker, "Stoker");
LanguageRegistry.addName(SteelDust, "Steel Dust");
LanguageRegistry.addName(steelOre, "Steel Ore");
LanguageRegistry.addName(ironRod, "Steel Rod");
LanguageRegistry.addName(itemSpearhead, "Spearhead");
MinecraftForge.setBlockHarvestLevel(steelOre, "pickaxe", 2);
GameRegistry.registerBlock(steelOre, "steelOre");
GameRegistry.registerItem(customWeapons.itemBroadsword, "Broadsword");
GameRegistry.registerItem(customWeapons.itemKnife, "Knife");
GameRegistry.registerItem(customWeapons.itemSpear, "Spear");
GameRegistry.registerItem(customWeapons.itemSaber, "Saber");
GameRegistry.addSmelting(customWeapons.SteelDust.itemID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addSmelting(customWeapons.ironRod.itemID, new ItemStack(customWeapons.itemSwordBlade), 0.0f);
GameRegistry.addSmelting(customWeapons.steelOre.blockID, new ItemStack(customWeapons.SteelIngot), 0.3f);
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.ironRod, 4), new ItemStack(customWeapons.SteelIngot), new ItemStack(customWeapons.SteelIngot));
GameRegistry.addShapelessRecipe(new ItemStack(customWeapons.itemStoker, 1), new ItemStack(customWeapons.ironRod), new ItemStack(customWeapons.ironRod));
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpear), " y", " x ", "x ", 'x', Item.stick, 'y', itemSpearhead);
GameRegistry.addRecipe(new ItemStack(customWeapons.itemSpearhead), " xx", " x", " ", 'x', SteelIngot);
ItemStack SteelOre = new ItemStack(customWeapons.steelOre);
ItemStack stick = new ItemStack(Item.stick);
ItemStack SteelDust = new ItemStack(customWeapons.SteelDust);
ItemStack steelIngot = new ItemStack(customWeapons.SteelIngot);
ItemStack itemDart = new ItemStack(customWeapons.itemDart);
ItemStack ironRod = new ItemStack(customWeapons.ironRod);
ItemStack itemSpearhead = new ItemStack(customWeapons.itemSpearhead);
}
@PostInit
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
}
}
Crash report:
---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.
Time: 5/22/13 2:55 PM
Description: Failed to start game
java.lang.NullPointerException
at cpw.mods.fml.common.registry.GameData.setName(GameData.java:253)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:150)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:138)
at rokkit.customweapons.customWeapons.load(customWeapons.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Thread.java:680)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8.3
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 955811552 bytes (911 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.43.676 Minecraft Forge 7.7.1.676 4 mods loaded, 4 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.1.43.676} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.7.1.676} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
CustomWeapons{0.0.1} [Custom Weapons] (bin) Unloaded->Constructed->Pre-initialized->Errored
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.6.37, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
public static Item itemBroadsword;
public static Item itemKnife;
public static Item itemSaber;
public static Item itemSpear;
You need to instantiate the items before you register them.
This is the solution to your error. You're getting a NullPointerException, which means that one of the variables you're trying to reference is returning null.
In your code, because the variables in the quote above aren't instantiated, they're null. Therefore, your registerItem calls are going to fail. Change the lines above like so:
public static Item itemBroadsword = new Item(222).setUnlocalizedName("itemBroadsword");
public static Item itemKnife = new Item(223).setUnlocalizedName("itemKnife");
public static Item itemSaber = new Item(224).setUnlocalizedName("itemSaber");
public static Item itemSpear = new Item(225).setUnlocalizedName("itemSpear");
Just change the IDs/instantiated classes/unlocalized names as necessary.
Here is my main code, let me know if I need any other code:
Thanks in advance!
Are your proxies names: ClientProxy and CommonProxy? If not, add your entire proxy name to it. (:
^^ Click the Signature to go to my page. (: ^^
One thing i see wrong is your instance. You instance has to be the same as your modid. Which means you have to take the space out between the instance. (:
^^ Click the Signature to go to my page. (: ^^
You need to instantiate the items before you register them.
New code:
Crash MSG:
Actually No, You DONT have to do that
Here:
I am checking something quickly, be back soon!Ok, so I fixed that error. Still getting the old one.
Here is the new code should it help:
Crash report:
This is the solution to your error. You're getting a NullPointerException, which means that one of the variables you're trying to reference is returning null.
In your code, because the variables in the quote above aren't instantiated, they're null. Therefore, your registerItem calls are going to fail. Change the lines above like so:
Just change the IDs/instantiated classes/unlocalized names as necessary.
I am trying now.