1

Plz help! TONS of errors!

DeathDragon117 3/26/13 8:34 pm
227
3/27/2013 9:43 pm
I'm making a new mod that a adds a ton of Iron stuff and i JUST started. I made a Hammer, and i tested it, and i got this error:

-Exception in thread "main" java.lang.ExceptionInInitializerError
at net.minecraft.src.BlockSnow.<clinit>(BlockSnow.java:944)
at net.minecraft.src.StatList.initMinableStats(StatList.java:180)
at net.minecraft.src.StatList.<clinit>(StatList.java:87)
at net.minecraft.client.Minecraft.<init>(Minecraft.java:292)
at net.minecraft.src.LoadingScreenRenderer.<init>(LoadingScreenRenderer.java:14)
at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
at net.minecraft.client.Minecraft.main(Minecraft.java:2264)
at Start.main(Start.java:22)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ItemEnderEye.<init>(ItemEnderEye.java:16)
at net.minecraft.src.xf.<init>(xf.java:9)
at net.minecraft.src.ItemMinecart.<clinit>(ItemMinecart.java:11)


I dont know what to do! I have asked coders and they have never seen this error. Here is my coding too if you need it.

->package net.minecraft.src;

public class Irony_mod extends BaseMod;

@

pubic static final Swordhammer = (new ItemSword(450,
EnumToolMaterial.IRON)).setUnlocalizedName("Hammer");

public void load ()

{


ModLoader.addRecipe(new ItemStack (Hammer, 1), new Object [] {"###", "X", " X ",
Character.valueOf('#'), Hammer, Character.valueOf('X'), Item.Stick});

ModLoader.addName(Hammer,"Sword Pickaxe Name");
}

public String getVersion();
{
return "1.5.1";
}
}

Please help me!
Posted by
DeathDragon117
Level 26 : Expert Dragonborn
16

  Have something to say?

JoinSign in

4

DeathDragon117
03/27/2013 9:43 pm
Level 26 : Expert Dragonborn
Allright. I'll try tht out and I'll get back to ya if it worked.
1
thegameguy311
03/27/2013 9:01 pm
Level 38 : Artisan Nether Knight
You have to name your mod with a mod_ then the name! That's where most of the errors are from! Make a new class called mod_Irony and use this as the code:
package net.minecraft.src;

import java.util.Random;
import java.awt.Color;
import java.util.Map;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class mod_Irony extends BaseMod;
{

pubic static final Swordhammer = new ItemSword(450,
EnumToolMaterial.IRON).setCreativeTab(CreativeTabs.tabCombat).setUnlocalizedName("Hammer");

public void load ()
{

ModLoader.addName(Swordhammer, "Sword Hammer"); //It was supposed to be the public static final name then the in game name which I assume is Sword Hammer
ModLoader.addRecipe(new ItemStack (Hammer, 1), new Object []
{
"###", " X ", " X " //You didn't make and item called hammer, so I switched it to iron ingots
'#', Item.ingotIron, 'X', Item.stick
});

}

public String getVersion();
{
return "1.5.1";
}
}
I hope this helped.
1
DeathDragon117
03/27/2013 8:35 pm
Level 26 : Expert Dragonborn
Eclispe told me to add tht....it didnt seem right. Anyway, i tried it without tht, and it still failed.
1
ehdfawq3er
03/27/2013 3:06 am
Level 61 : High Grandmaster Modder
First question, why is that @ sympol in the code? That might be it.
1

Welcome