Im new to Modding and dont know very much I got my other npc thats Linked to EntityZombie.class but heres my code
package net.minecraft.src;
import java.util.Map;
public class Human extends EntityMob {
protected ModelBiped modelBipedMain;
private Village villageObj;
public Human(World par1World)
{
super(par1World);
this.equipment[4] = new ItemStack(Item.swordDiamond, 1);
this.setCanPickUpLoot(true);
this.texture = "/mob/char.png";
this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, this.moveSpeed, false));
this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
this.villageObj = this.worldObj.villageCollectionObj.findNearestVillage(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 32);
this.tasks.addTask(0, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTwardsRestriction(this, 0.3F));
this.setSize(0.6F, 1.8F);
this.moveSpeed = .35F;
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityZombie.class, 1.0F, 0, true));
tasks.addTask(1, new EntityAIAttackOnCollide(this, moveSpeed, true));
targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, net.minecraft.src.Zombiehoard.class, 16F, 0, true));
int var1 = 0;
if (var1 == 0)
{
this.setCurrentItemOrArmor(0, new ItemStack(Item.swordIron, 1));
}
}
protected int func_96121_ay()
{
return 40;
}
public int func_82193_c(Entity par1Entity) {
return 0;
}
package net.minecraft.src;
import java.util.Map;
public class Human extends EntityMob {
protected ModelBiped modelBipedMain;
private Village villageObj;
public Human(World par1World)
{
super(par1World);
this.equipment[4] = new ItemStack(Item.swordDiamond, 1);
this.setCanPickUpLoot(true);
this.texture = "/mob/char.png";
this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, this.moveSpeed, false));
this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
this.villageObj = this.worldObj.villageCollectionObj.findNearestVillage(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 32);
this.tasks.addTask(0, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTwardsRestriction(this, 0.3F));
this.setSize(0.6F, 1.8F);
this.moveSpeed = .35F;
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityZombie.class, 1.0F, 0, true));
tasks.addTask(1, new EntityAIAttackOnCollide(this, moveSpeed, true));
targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, net.minecraft.src.Zombiehoard.class, 16F, 0, true));
int var1 = 0;
if (var1 == 0)
{
this.setCurrentItemOrArmor(0, new ItemStack(Item.swordIron, 1));
}
}
protected int func_96121_ay()
{
return 40;
}
public int func_82193_c(Entity par1Entity) {
return 0;
}
private VillageDoorInfo doorInfo;
public boolean isAIEnabled()
{
return true;
}
public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
{
this.getEquipment()[par1] = par2ItemStack;
}
public boolean canAttackClass(Class par1Class)
{
return !par1Class.equals(EntityPlayer.class);
}
@Override
public int getMaxHealth()
{
// TODO Auto-generated method stub
return 150;
}
public void addRenderer(Map var1)
{
var1.put(Human.class, new RenderBiped(new ModelBiped(),.5f));
}
}