Java 类net.minecraft.entity.ai.EntityAIEatGrass 实例源码

项目:Tannery    文件:Elk.java   
public Elk(World worldIn)
{
    super(worldIn);
    this.setSize(1.8F, 2.5F);
    ((PathNavigateGround) this.getNavigator()).func_179690_a(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3,
            new EntityAITempt(this, 1.25D, Item.getItemFromBlock(Blocks.grass), false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(5, new EntityAIEatGrass(this));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));

}
项目:Tannery    文件:ElkBaby.java   
public ElkBaby(World worldIn)
{
    super(worldIn);
    this.setSize(1.8F, 2.5F);
    ((PathNavigateGround) this.getNavigator()).func_179690_a(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3,
            new EntityAITempt(this, 1.25D, Item.getItemFromBlock(Blocks.grass), false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(5, new EntityAIEatGrass(this));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));

}
项目:Backmemed    文件:EntitySheep.java   
protected void initEntityAI()
{
    this.entityAIEatGrass = new EntityAIEatGrass(this);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
项目:CustomWorldGen    文件:EntitySheep.java   
protected void initEntityAI()
{
    this.entityAIEatGrass = new EntityAIEatGrass(this);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
项目:ExpandedRailsMod    文件:EntitySheep.java   
protected void initEntityAI()
{
    this.entityAIEatGrass = new EntityAIEatGrass(this);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
项目:NeptuneMod    文件:NeptuneAIFactory.java   
@Override
public AIEatGrass newAIEatGrass(EntityLiving entity) {
    return (AIEatGrass) new EntityAIEatGrass((net.minecraft.entity.EntityLiving) entity);
}