Here is my code i have added the item now.
public class kingNoodle extends BaseMod{
public kingNoodle(){}
public static Item block;
public void load(){
ModLoader.addName(block, "Tex Ball");
ModLoader.addName(block, "King Noodle");new ChestGenHooks("dungeonChest").addItem(new WeightedRandomChestContent(new ItemStack(block), 1, 1, 10));
ModLoader.registerEntityID(EntityTexBall.class, "Fireball", -2000);
ModLoader.addEntityTracker(this, EntityTexBall.class, -2000, 80, 3, true);
}
public void addRenderer(Map var1)
{
var1.put(EntityTexBall.class, new RenderSnowball(kingNoodle.texBall));
}
public Entity spawnEntity(int var1, World var2, double var3, double var5, double var7)
{
switch (var1)
{
case -2000:
return new EntityTexBall(var2);
default:
return null;
}
}
public Packet23VehicleSpawn getSpawnPacket(Entity var1, int var2)
{
return var1 instanceof EntityTexBall ? new Packet23VehicleSpawn(var1, var2): null;
}
public String getVersion(){
return "1.0";
}
static{
block = (new ItemkingNoodle(194));
block = (new texBall(195));
}
static class ItemkingNoodle extends Item{
public ItemkingNoodle(int par1){
super(par1);
setMaxDamage(0);
maxStackSize = 1;
setUnlocalizedName("GoldenNoodle");
setTextureName("GoldenNoodle");
setCreativeTab(texTab.tab);
}
public boolean hasEffect(ItemStack par1ItemStack)
{
return true;
}
public int getItemEnchantability()
{
return 10;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0;
}
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return 1.0F;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer entity)
{
world.playSoundAtEntity(entity, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!world.isRemote)
{
world.spawnEntityInWorld(new EntityEnderPearl(world, entity));
}
return par1ItemStack;
}
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean is)
{
list.add("Teleporting Wand");
}
}}