Jump to content

Null pointer Exception on the class


Fowlron

Recommended Posts

Hi.

I created this account to ask help in this matter.

Im creating a mod with my mod team, but we have a BIG problem.

As we have many modders, we need to work on separated classes, otherwise we cant work at the same time. We have everything set up with github btw.

But I'm getting a null pointer exception when calling gameRegistry.addRecipe

 

Main class:

 

package wildKingdoms.dungeonsAndDigging; //Package directory

 

import wildKingdoms.dungeonsAndDigging.*;

import wildKingdoms.dungeonsAndDigging.blocks.*;

import wildKingdoms.dungeonsAndDigging.items.*;

import net.minecraft.block.Block;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemFood;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.EnumHelper;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

/*

* Basic needed forge stuff

*/

@Mod(modid = "DungeonsAndDigging", name = "Dungeons & Digging", version = "v1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class Main {

 

/*

* ToolMaterial

*/

 

// Telling forge that we are creating these

 

public static Item crystal;

public static Item ruby;

public static Item saphire;

 

public static Block crystalOre;

public static Block rubyOre;

public static Block saphireOre;

 

public static Block crystalBlock;

public static Block rubyBlock;

public static Block saphireBlock;

 

// Declaring Init

@Init

public void load(FMLInitializationEvent event) {

DDBlocks DDBlocksClass = new DDBlocks();

DDItems DDItemsClass = new DDItems();

 

DDItemsClass.init(crystal, ruby, saphire, crystalOre, rubyOre, saphireOre);

DDBlocksClass.init(crystalOre, rubyOre, saphireOre, crystalBlock, rubyBlock, saphireBlock);

 

DDItemsClass.recipes(crystal, ruby, saphire, crystalBlock, rubyBlock, saphireBlock);

DDBlocksClass.recipes(crystal, ruby, saphire, crystalBlock, rubyBlock, saphireBlock);

}

 

}

 

 

 

 

DDItems Class:

 

package wildKingdoms.dungeonsAndDigging.items;

 

import wildKingdoms.dungeonsAndDigging.Main;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.Block;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

 

public class DDItems {

public static void init(Item crystal, Item ruby, Item saphire,

Block crystalOre, Block rubyOre, Block saphireBlock) {

// define items/blocks

crystal = new DDGemItems(3200).setUnlocalizedName("crystal")

.setTextureName("DungeonsAndDigging:crystal");

ruby = new DDGemItems(3201).setUnlocalizedName("ruby").setTextureName(

"DungeonsAndDigging:ruby");

ruby = new DDGemItems(3202).setUnlocalizedName("saphire")

.setTextureName("DungeonsAndDigging:saphire");

 

// adding names

LanguageRegistry.addName(crystal, "Crystal");

LanguageRegistry.addName(ruby, "Ruby");

LanguageRegistry.addName(ruby, "Saphire");

 

}

 

public static void recipes(Item crystal, Item ruby, Item saphire,

Block crystalBlock, Block rubyBlock, Block saphireBlock)

GameRegistry.addShapelessRecipe(new ItemStack(crystal, 9),  //<- I get a Null Pointer Excepetion in the new "ItemStack(crystal, 9)" part

new Object[] { crystalBlock });

GameRegistry.addShapelessRecipe(new ItemStack(ruby, 9),  //<- Would get bug here as well, if it would reach this part

new Object[] { rubyBlock });

GameRegistry.addShapelessRecipe(new ItemStack(saphire, 9),  //<- Would get bug here as well, if it would reach this part

new Object[] { saphireBlock });

}

}

 

 

DDBlocks Class:

 

package wildKingdoms.dungeonsAndDigging.blocks;

 

import wildKingdoms.dungeonsAndDigging.Main;

import wildKingdoms.dungeonsAndDigging.blocks.ores.DDCrystalOre;

import wildKingdoms.dungeonsAndDigging.blocks.ores.DDRubyOre;

import wildKingdoms.dungeonsAndDigging.blocks.ores.DDSaphireOre;

import wildKingdoms.dungeonsAndDigging.blocks.solidBlocks.DDCrystalBlock;

import wildKingdoms.dungeonsAndDigging.blocks.solidBlocks.DDRubyBlock;

import wildKingdoms.dungeonsAndDigging.blocks.solidBlocks.DDSaphireBlock;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.Block;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

 

public class DDBlocks {

public static void init(Block crystalOre, Block rubyOre, Block saphireOre,

Block crystalBlock, Block rubyBlock, Block saphireBlock) {

// define items/blocks

// ORES

crystalOre = new DDCrystalOre(3600, "crystalOre")

.setUnlocalizedName("crystalOre").setHardness(3.0F)

.setStepSound(Block.soundStoneFootstep).setResistance(8.0F)

.setTextureName("DungeonsAndDigging:crystalOre");

GameRegistry.registerBlock(crystalOre, "crystalOre");

 

rubyOre = new DDRubyOre(3601, "rubyOre").setUnlocalizedName("rubyOre")

.setHardness(2.0F).setStepSound(Block.soundStoneFootstep)

.setResistance(9.0F)

.setTextureName("DungeonsAndDigging:rubyOre");

GameRegistry.registerBlock(rubyOre, "rubyOre");

 

saphireOre = new DDSaphireOre(3602, "saphireOre")

.setUnlocalizedName("saphireOre").setHardness(2.0F)

.setStepSound(Block.soundStoneFootstep).setResistance(9.0F)

.setTextureName("DungeonsAndDigging:saphireOre");

GameRegistry.registerBlock(saphireOre, "saphireOre");

 

// SOLID BLOCKS

crystalBlock = new DDCrystalBlock(3603, "crystalBlock")

.setUnlocalizedName("crystalBlock").setHardness(3.0F)

.setStepSound(Block.soundMetalFootstep).setResistance(9.0F)

.setTextureName("DungeonsAndDigging:crystalBlock");

GameRegistry.registerBlock(crystalBlock, "crystalBlock");

 

rubyBlock = new DDRubyBlock(3604, "rubyBlock")

.setUnlocalizedName("rubyBlock").setHardness(3.0F)

.setStepSound(Block.soundMetalFootstep).setResistance(9.0F)

.setTextureName("DungeonsAndDigging:rubyBlock");

GameRegistry.registerBlock(rubyBlock, "rubyBlock");

 

saphireBlock = new DDSaphireBlock(3605, "saphireBlock")

.setUnlocalizedName("saphireBlock").setHardness(3.0F)

.setStepSound(Block.soundMetalFootstep).setResistance(11.0F)

.setTextureName("DungeonsAndDigging:saphireBlock");

GameRegistry.registerBlock(saphireBlock, "saphireBlock");

 

// adding names

// ORES

LanguageRegistry.addName(crystalOre, "Crystal Ore");

LanguageRegistry.addName(rubyOre, "Ruby Ore");

LanguageRegistry.addName(saphireOre, "Saphire Ore");

 

// SOLILD BLOCKS

LanguageRegistry.addName(crystalBlock, "Crystal Block");

LanguageRegistry.addName(rubyBlock, "Ruby Block");

LanguageRegistry.addName(saphireBlock, "Saphire Block");

 

// crafting

}

 

public static void recipes(Item crystal, Item ruby, Item saphire,

Block crystalBlock, Block rubyBlock, Block saphireBlock) {

GameRegistry.addRecipe(new ItemStack(crystalBlock, 1),//<- Would get bug here as well, if it would reach this part

new Object[] { "TTT", "TTT", "TTT", 'T', crystal, });

GameRegistry.addRecipe(new ItemStack(rubyBlock, 1),//<- Would get bug here as well, if it would reach this part

new Object[] { "TTT", "TTT", "TTT", 'T', ruby, });

GameRegistry.addRecipe(new ItemStack(saphireBlock, 1),//<- Would get bug here as well, if it would reach this part

new Object[] { "TTT", "TTT", "TTT", 'T', saphire, });

}

}

 

 

 

The error log:

 

Nov 16, 2013 6:42:39 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Nov 16, 2013 6:42:40 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Nov 16, 2013 6:42:40 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

2013-11-16 18:42:40 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.4.20.916 for Minecraft 1.6.4 loading

2013-11-16 18:42:40 [iNFO] [ForgeModLoader] Java is Java HotSpot Server VM, version 1.7.0_45, running on Linux:i386:3.11.0-13-generic, installed at /usr/local/java/jre1.7.0_45

2013-11-16 18:42:40 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

2013-11-16 18:42:41 [iNFO] [sTDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg

2013-11-16 18:42:41 [iNFO] [sTDOUT] Loaded 109 rules from AccessTransformer config file forge_at.cfg

2013-11-16 18:42:41 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!

2013-11-16 18:42:49 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

2013-11-16 18:42:49 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

2013-11-16 18:42:50 [iNFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}

2013-11-16 18:42:56 [iNFO] [Minecraft-Client] Setting user: Player589

2013-11-16 18:42:56 [iNFO] [Minecraft-Client] (Session ID is null)

2013-11-16 18:43:04 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0

2013-11-16 18:43:07 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default

2013-11-16 18:43:09 [iNFO] [sTDOUT]

2013-11-16 18:43:09 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-11-16 18:43:09 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-11-16 18:43:09 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-11-16 18:43:09 [iNFO] [sTDOUT] OpenAL initialized.

2013-11-16 18:43:09 [iNFO] [sTDOUT]

2013-11-16 18:43:10 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization

2013-11-16 18:43:10 [iNFO] [sTDOUT] MinecraftForge v9.11.1.916 Initialized

2013-11-16 18:43:10 [iNFO] [ForgeModLoader] MinecraftForge v9.11.1.916 Initialized

2013-11-16 18:43:11 [iNFO] [sTDOUT] Replaced 101 ore recipies

2013-11-16 18:43:11 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization

2013-11-16 18:43:11 [iNFO] [ForgeModLoader] Reading custom logging properties from /home/pedro/Programas/forge/mcp/jars/config/logging.properties

2013-11-16 18:43:11 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL

2013-11-16 18:43:12 [iNFO] [ForgeModLoader] Searching /home/pedro/Programas/forge/mcp/jars/mods for mods

2013-11-16 18:43:23 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load

2013-11-16 18:43:23 [iNFO] [mcp] Activating mod mcp

2013-11-16 18:43:23 [iNFO] [FML] Activating mod FML

2013-11-16 18:43:23 [iNFO] [Forge] Activating mod Forge

2013-11-16 18:43:23 [iNFO] [DungeonsAndDigging] Activating mod DungeonsAndDigging

2013-11-16 18:43:23 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well

2013-11-16 18:43:23 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well

2013-11-16 18:43:23 [WARNING] [Dungeons & Digging] Mod Dungeons & Digging is missing a pack.mcmeta file, things may not work well

2013-11-16 18:43:23 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Dungeons & Digging

2013-11-16 18:43:24 [iNFO] [sTDOUT]

2013-11-16 18:43:24 [iNFO] [sTDOUT] SoundSystem shutting down...

2013-11-16 18:43:24 [iNFO] [sTDOUT]    Author: Paul Lamb, www.paulscode.com

2013-11-16 18:43:24 [iNFO] [sTDOUT]

2013-11-16 18:43:24 [iNFO] [sTDOUT]

2013-11-16 18:43:24 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-11-16 18:43:24 [iNFO] [ForgeModLoader] Registering Forge Packet Handler

2013-11-16 18:43:24 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-11-16 18:43:24 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-11-16 18:43:24 [iNFO] [sTDOUT] OpenAL initialized.

2013-11-16 18:43:24 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler

2013-11-16 18:43:25 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

2013-11-16 18:43:25 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue

2013-11-16 18:43:34 [sEVERE] [ForgeModLoader]

mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{6.4.20.916} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized

Forge{9.11.1.916} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized

DungeonsAndDigging{v1} [Dungeons & Digging] (bin) Unloaded->Constructed->Pre-initialized->Errored

2013-11-16 18:43:34 [sEVERE] [ForgeModLoader] The following problems were captured during this phase

2013-11-16 18:43:34 [sEVERE] [ForgeModLoader] Caught exception from DungeonsAndDigging

java.lang.NullPointerException

at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)

at wildKingdoms.dungeonsAndDigging.items.DDItems.recipes(DDItems.java:30)

at wildKingdoms.dungeonsAndDigging.Main.load(Main.java:53)

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:545)

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:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

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:194)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)

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:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

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:105)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:508)

at net.minecraft.client.Minecraft.run(Minecraft.java:807)

at net.minecraft.client.main.Main.main(Main.java:93)

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:131)

at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

2013-11-16 18:43:34 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----

2013-11-16 18:43:34 [iNFO] [sTDOUT] // Don't be sad, have a hug! <3

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] Time: 16-11-2013 18:43

2013-11-16 18:43:34 [iNFO] [sTDOUT] Description: Initializing game

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] java.lang.NullPointerException

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at wildKingdoms.dungeonsAndDigging.items.DDItems.recipes(DDItems.java:30)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at wildKingdoms.dungeonsAndDigging.Main.load(Main.java:53)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.startGame(Minecraft.java:508)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:807)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:

2013-11-16 18:43:34 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] -- Head --

2013-11-16 18:43:34 [iNFO] [sTDOUT] Stacktrace:

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at wildKingdoms.dungeonsAndDigging.items.DDItems.recipes(DDItems.java:30)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at wildKingdoms.dungeonsAndDigging.Main.load(Main.java:53)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.startGame(Minecraft.java:508)

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] -- Initialization --

2013-11-16 18:43:34 [iNFO] [sTDOUT] Details:

2013-11-16 18:43:34 [iNFO] [sTDOUT] Stacktrace:

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:807)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)

2013-11-16 18:43:34 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

2013-11-16 18:43:34 [iNFO] [sTDOUT]

2013-11-16 18:43:34 [iNFO] [sTDOUT] -- System Details --

2013-11-16 18:43:34 [iNFO] [sTDOUT] Details:

2013-11-16 18:43:34 [iNFO] [sTDOUT] Minecraft Version: 1.6.4

2013-11-16 18:43:34 [iNFO] [sTDOUT] Operating System: Linux (i386) version 3.11.0-13-generic

2013-11-16 18:43:34 [iNFO] [sTDOUT] Java Version: 1.7.0_45, Oracle Corporation

2013-11-16 18:43:34 [iNFO] [sTDOUT] Java VM Version: Java HotSpot Server VM (mixed mode), Oracle Corporation

2013-11-16 18:43:34 [iNFO] [sTDOUT] Memory: 982799824 bytes (937 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)

2013-11-16 18:43:34 [iNFO] [sTDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

2013-11-16 18:43:34 [iNFO] [sTDOUT] AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

2013-11-16 18:43:34 [iNFO] [sTDOUT] Suspicious classes: FML and Forge are installed

2013-11-16 18:43:34 [iNFO] [sTDOUT] IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

2013-11-16 18:43:34 [iNFO] [sTDOUT] FML: MCP v8.11 FML v6.4.20.916 Minecraft Forge 9.11.1.916 4 mods loaded, 4 mods active

2013-11-16 18:43:34 [iNFO] [sTDOUT] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

2013-11-16 18:43:34 [iNFO] [sTDOUT] FML{6.4.20.916} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized

2013-11-16 18:43:34 [iNFO] [sTDOUT] Forge{9.11.1.916} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized

2013-11-16 18:43:34 [iNFO] [sTDOUT] DungeonsAndDigging{v1} [Dungeons & Digging] (bin) Unloaded->Constructed->Pre-initialized->Errored

2013-11-16 18:43:34 [iNFO] [sTDOUT] Launched Version: 1.6

2013-11-16 18:43:34 [iNFO] [sTDOUT] LWJGL: 2.9.0

2013-11-16 18:43:34 [iNFO] [sTDOUT] OpenGL: Mesa DRI Intel® 945GME x86/MMX/SSE2 GL version 1.4 Mesa 9.2.1, Intel Open Source Technology Center

2013-11-16 18:43:34 [iNFO] [sTDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge'

2013-11-16 18:43:34 [iNFO] [sTDOUT] Type: Client (map_client.txt)

2013-11-16 18:43:34 [iNFO] [sTDOUT] Resource Pack: Default

2013-11-16 18:43:34 [iNFO] [sTDOUT] Current Language: English (US)

2013-11-16 18:43:34 [iNFO] [sTDOUT] Profiler Position: N/A (disabled)

2013-11-16 18:43:34 [iNFO] [sTDOUT] Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

2013-11-16 18:43:34 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# /home/pedro/Programas/forge/mcp/jars/./crash-reports/crash-2013-11-16_18.43.34-client.txt

AL lib: (EE) alc_cleanup: 1 device not closed

 

 

Thanks in advance for any help

Link to comment
Share on other sites

Impossible to read this wall of tekst.

 

Please use spoiler and code tags to format your post so it's readable.

Please include crash report (The full console output of the crash) in spoiler and code tags.

 

If you know which line is the offending line then write the contents of that line above all the spoilers.

As a rule of thumb, 1 spoiler tag for each file. and 1 separate spoiler tag for the crash log/report.

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Impossible to read this wall of tekst.

 

Please use spoiler and code tags to format your post so it's readable.

Please include crash report (The full console output of the crash) in spoiler and code tags.

 

If you know which line is the offending line then write the contents of that line above all the spoilers.

As a rule of thumb, 1 spoiler tag for each file. and 1 separate spoiler tag for the crash log/report.

 

Sorry my bad. Solved that. Can you help me here?

Link to comment
Share on other sites

What's Line 30 from DDItems?

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

I don't know GitHub, but I'm pretty sure you can collaborate on one file. Anyway, to do this CORRECTLY, you need to:

 

1. Put the init and recipes in the MAIN CLASS instead of complicating yourself up in crazy ways.

 

2. Put the contents of the init in your load method.

 

3. Put the contents of your recipes method into your load method.

 

4. Delete your init and recipes methods.

 

Again, I state you can use just ONE file, not a million.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

What's Line 30 from DDItems?

 

Its this one:

 

GameRegistry.addShapelessRecipe(new ItemStack(crystal, 9),

 

 

There are comments with the lines that give me errors. Well, errors when running, eclipse doesnt find any.

 

I now the problem is with this:

 

new ItemStack(crystal, 9)

 

I just dont know why he returns a Null Pointer Exception.

 

Edit:

But your repository only updates if you use the git pull command, and it wont commit with the push command unless you have the latest version of the file available in the repository. So if someones pushes, you wont know it, and when you push it you will receive an error, and you need to pull and lose ALL the work youve done since the last commit. This is very hard to handle, that's why we should code eveything in separated class files.

If you want to have a look at all the code, have a look at this:

https://github.com/Wild-Kingdoms/Dungeons-and-Digging

Link to comment
Share on other sites

1. Put the init and recipes in the MAIN CLASS instead of complicating yourself up in crazy ways.

 

2. Put the contents of the init in your load method.

 

3. Put the contents of your recipes method into your load method.

 

4. Delete your init and recipes methods.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

Also don't new Object(){} for your recipes.  You can just add them as parameters:

 

GameRegistry.addShapelessRecipe(new ItemStack(BlockTrap.instance), new ItemStack(Item.painting), new ItemStack(Block.dispenser));

or

 

GameRegistry.addShapedRecipe(new ItemStack(BlockWallPlate.instance, 2), "s", "s", "s", 's', stone);

 

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

I now the problem is with this:

 

new ItemStack(crystal, 9)

 

I just dont know why he returns a Null Pointer Exception.

 

Edit:

But your repository only updates if you use the git pull command, and it wont commit with the push command unless you have the latest version of the file available in the repository. So if someones pushes, you wont know it, and when you push it you will receive an error, and you need to pull and lose ALL the work youve done since the last commit. This is very hard to handle, that's why we should code eveything in separated class files.

If you want to have a look at all the code, have a look at this:

https://github.com/Wild-Kingdoms/Dungeons-and-Digging

Because "crystal" is null.

 

There are merge tools for github. You should learn and discuss within your team about how you want to use them.

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.

Announcements



×
×
  • Create New...

Important Information

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