1

Coding help

Jenssons 6/29/12 12:35 pm
109
6/29/2012 8:13 pm
how do i make a spawn egg so far all i got

package net.minecraft.src;

import java.util.Random;

public class mod_Itemspawnegg
{

public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer
entityplayer)
{
Entitytank test = new Entitytank(world);
test.setLocationAndAngles(entityplayer.posX, entityplayer.posY,
entityplayer.posZ, entityplayer.rotationYaw, 0.3F);
world.entityJoinedWorld(test);
itemstack.stackSize--;
return itemstack;
}
}

what less do i need?
Posted by
Jenssons
Level 55 : Grandmaster Modder
43

  Have something to say?

JoinSign in

1

DusteroftheCentury
06/29/2012 8:13 pm
Level 16 : Journeyman Skinner
Actually, all you need is to when making a new mob, just use this
ModLoader.registerEntityID(EntityExample.class, "Example", ModLoader.getUniqueEntityId(),0x<html color code>, 0x<html colo code>);
ModLoader.addLocalization("entity.Example.name", "Example");

The color codes are for the color of the egg
1

Welcome