Specific Spawn Egg

Started by DiscordiaEris on Fri, 04/22/2016 - 16:20

Topic category: Advanced modding

Last seen on 00:20, 18. Apr 2018
Joined Mar 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Specific Spawn Egg
Fri, 04/22/2016 - 16:20

In this code, how to I modify it to give an egg that goes with the destroyed mob?

 

@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entity, EntityLivingBase entity2){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;

if(true){
if(entity instanceof EntityPlayer)((EntityPlayer)entity).inventory.addItemStackToInventory(new ItemStack(Items.spawn_egg, 1));
}