Jump to content

Recommended Posts

Posted

Main class

 

package mods.dawnables.common;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.EnumHelper;

import net.minecraftforge.common.MinecraftForge;

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;

 

@Mod(modid = "Dawnable_sky", name = "Skydoesminecraft", version = "1.0")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

 

 

public class Skydoesminecraft {

 

public static EnumToolMaterial DAWN = EnumHelper.addToolMaterial("DAWN", 3, 2000, 12.0F, 5, 22);

 

 

    public static Block DawnableOre;

    public static Item DawnableIngot;

  public static Item DawnablePickaxe;

 

 

 

    //Blocks ID

    int DawnableOreID = 500;

 

    //Items ID

    int DawnableIngotID = 800;

  int DawnablePickaxeID = 801;

   

   

 

@Init

public void load(FMLInitializationEvent event){

 

DawnableOre = new BlockDawnableOre(DawnableOreID, Material.iron).setHardness(30.2F).setLightValue(1).setUnlocalizedName("face");

DawnableIngot = new ItemDawnableIngot(DawnableIngotID).setUnlocalizedName("skrills");

DawnablePickaxe =new ItemDawnablePickaxe(DawnablePickaxeID, DAWN).setUnlocalizedName("see");

 

 

//smellting

GameRegistry.addSmelting(DawnableOreID, new ItemStack(DawnableIngot, 1), 5.0F);

//Tools Only

MinecraftForge.setToolClass(DawnablePickaxe, "pickaxe", 3);

 

 

 

GameRegisters();

LanguageRegisters();

craftingRecipes();

 

 

 

}

 

 

private static void GameRegisters(){

GameRegistry.registerBlock(DawnableOre, "dawnableore");

GameRegistry.registerItem(DawnableIngot, "dawnableingot");

GameRegistry.registerItem(DawnablePickaxe, "itemdawnablepickaxe");

 

}

 

private static void LanguageRegisters(){

LanguageRegistry.addName(DawnableOre, "Dawnable Ore");

LanguageRegistry.addName(DawnableIngot, "Dawnable Ingot");

LanguageRegistry.addName(DawnablePickaxe, "Dawnable Pickaxe");

}

 

public void craftingRecipes(){

GameRegistry.addRecipe(new ItemStack(Block.sponge), new Object []{

"SSS", "SSS", "SSS",

'S', Skydoesminecraft.DawnableIngot

});

}

 

 

 

}

       

 

Item class

 

package mods.dawnables.common;

 

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.ItemPickaxe;

 

 

 

public class ItemDawnablePickaxe extends ItemPickaxe{

 

protected ItemDawnablePickaxe(int i, EnumToolMaterial enumToolMaterial){

super(i, enumToolMaterial);

setMaxStackSize(1);

setCreativeTab(CreativeTabs.tabTools);

 

}

 

@Override

public void updateIcons(IconRegister iconRegister){

iconIndex = iconRegister.registerIcon("dawnables:Dawnpick");

}

 

 

 

}

 

 

 

Crash report i keep getting

 

Minecraft Crash Report ----

// I just don't know what went wrong :(

 

Time: 12/04/13 13:44

Description: Failed to start game

 

java.lang.NullPointerException

at net.minecraft.item.ItemTool.<init>(ItemTool.java:30)

at net.minecraft.item.ItemPickaxe.<init>(ItemPickaxe.java:13)

at mods.dawnables.common.ItemDawnablePickaxe.<init>(ItemDawnablePickaxe.java:13)

at mods.dawnables.common.Skydoesminecraft.load(Skydoesminecraft.java:46)

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

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: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(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: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:444)

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

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

at java.lang.Thread.run(Unknown Source)

 

 

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: Windows 7 (x86) version 6.1

Java Version: 1.7.0_17, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 932965056 bytes (889 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 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.13.629 Minecraft Forge 7.7.1.629 4 mods loaded, 4 mods active

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

FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized

Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized

Dawnable_sky [skydoesminecraft] (bin) Unloaded->Constructed->Pre-initialized->Errored

LWJGL: 2.4.2

OpenGL: Intel® HD Graphics Family GL version 3.1.0 - Build 8.15.10.2430, Intel

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

 

 

 

 

Help Plz for 1.5.1

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.