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

项目:DecompiledMinecraft    文件:EntityRabbit.java   
public EntityRabbit(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    this.jumpHelper = new EntityRabbit.RabbitJumpHelper(this);
    this.moveHelper = new EntityRabbit.RabbitMoveHelper(this);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.navigator.setHeightRequirement(2.5F);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityRabbit.AIPanic(this, 1.33D));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.golden_carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Item.getItemFromBlock(Blocks.yellow_flower), false));
    this.tasks.addTask(3, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(5, new EntityRabbit.AIRaidFarm(this));
    this.tasks.addTask(5, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.aiAvoidWolves = new EntityRabbit.AIAvoidEntity(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
    this.tasks.addTask(4, this.aiAvoidWolves);
    this.setMovementSpeed(0.0D);
}
项目:DecompiledMinecraft    文件:EntityVillager.java   
public EntityVillager(World worldIn, int professionId)
{
    super(worldIn);
    this.villagerInventory = new InventoryBasic("Items", false, 8);
    this.setProfession(professionId);
    this.setSize(0.6F, 1.8F);
    ((PathNavigateGround)this.getNavigator()).setBreakDoors(true);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.setCanPickUpLoot(true);
}
项目:DecompiledMinecraft    文件:EntityOcelot.java   
public EntityOcelot(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
项目:DecompiledMinecraft    文件:EntityEnderman.java   
public EntityEnderman(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 2.9F);
    this.stepHeight = 1.0F;
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, false));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.tasks.addTask(10, new EntityEnderman.AIPlaceBlock(this));
    this.tasks.addTask(11, new EntityEnderman.AITakeBlock(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityEnderman.AIFindPlayer(this));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityEndermite.class, 10, true, false, new Predicate<EntityEndermite>()
    {
        public boolean apply(EntityEndermite p_apply_1_)
        {
            return p_apply_1_.isSpawnedByPlayer();
        }
    }));
}
项目:DecompiledMinecraft    文件:EntityWither.java   
public EntityWither(World worldIn)
{
    super(worldIn);
    this.setHealth(this.getMaxHealth());
    this.setSize(0.9F, 3.5F);
    this.isImmuneToFire = true;
    ((PathNavigateGround)this.getNavigator()).setCanSwim(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
    this.experienceValue = 50;
}
项目:DecompiledMinecraft    文件:EntityRabbit.java   
public EntityRabbit(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    this.jumpHelper = new EntityRabbit.RabbitJumpHelper(this);
    this.moveHelper = new EntityRabbit.RabbitMoveHelper(this);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.navigator.setHeightRequirement(2.5F);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityRabbit.AIPanic(this, 1.33D));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.golden_carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Item.getItemFromBlock(Blocks.yellow_flower), false));
    this.tasks.addTask(3, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(5, new EntityRabbit.AIRaidFarm(this));
    this.tasks.addTask(5, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.aiAvoidWolves = new EntityRabbit.AIAvoidEntity(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
    this.tasks.addTask(4, this.aiAvoidWolves);
    this.setMovementSpeed(0.0D);
}
项目:DecompiledMinecraft    文件:EntityHorse.java   
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
项目:DecompiledMinecraft    文件:EntitySheep.java   
public EntitySheep(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    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));
    this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
项目:DecompiledMinecraft    文件:EntityVillager.java   
public EntityVillager(World worldIn, int professionId)
{
    super(worldIn);
    this.villagerInventory = new InventoryBasic("Items", false, 8);
    this.setProfession(professionId);
    this.setSize(0.6F, 1.8F);
    ((PathNavigateGround)this.getNavigator()).setBreakDoors(true);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.setCanPickUpLoot(true);
}
项目:DecompiledMinecraft    文件:EntityPig.java   
public EntityPig(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 0.9F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    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));
}
项目:DecompiledMinecraft    文件:EntityOcelot.java   
public EntityOcelot(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
项目:DecompiledMinecraft    文件:EntitySkeleton.java   
public EntitySkeleton(World worldIn)
{
    super(worldIn);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIRestrictSun(this));
    this.tasks.addTask(3, new EntityAIFleeSun(this, 1.0D));
    this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityWolf.class, 6.0F, 1.0D, 1.2D));
    this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true));

    if (worldIn != null && !worldIn.isRemote)
    {
        this.setCombatTask();
    }
}
项目:DecompiledMinecraft    文件:EntityWither.java   
public EntityWither(World worldIn)
{
    super(worldIn);
    this.setHealth(this.getMaxHealth());
    this.setSize(0.9F, 3.5F);
    this.isImmuneToFire = true;
    ((PathNavigateGround)this.getNavigator()).setCanSwim(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
    this.experienceValue = 50;
}
项目:BaseClient    文件:EntityRabbit.java   
public EntityRabbit(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    this.jumpHelper = new EntityRabbit.RabbitJumpHelper(this);
    this.moveHelper = new EntityRabbit.RabbitMoveHelper(this);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.navigator.setHeightRequirement(2.5F);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityRabbit.AIPanic(this, 1.33D));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.golden_carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Item.getItemFromBlock(Blocks.yellow_flower), false));
    this.tasks.addTask(3, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(5, new EntityRabbit.AIRaidFarm(this));
    this.tasks.addTask(5, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.aiAvoidWolves = new EntityRabbit.AIAvoidEntity(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
    this.tasks.addTask(4, this.aiAvoidWolves);
    this.setMovementSpeed(0.0D);
}
项目:BaseClient    文件:EntityHorse.java   
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
项目:CustomWorldGen    文件:EntityWolf.java   
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
    this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(9, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
    this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
    this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0]));
    this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
        }
    }));
    this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, false));
}
项目:BaseClient    文件:EntitySheep.java   
public EntitySheep(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    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));
    this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
项目:BaseClient    文件:EntityVillager.java   
public EntityVillager(World worldIn, int professionId)
{
    super(worldIn);
    this.villagerInventory = new InventoryBasic("Items", false, 8);
    this.setProfession(professionId);
    this.setSize(0.6F, 1.8F);
    ((PathNavigateGround)this.getNavigator()).setBreakDoors(true);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.setCanPickUpLoot(true);
}
项目:BaseClient    文件:EntityPig.java   
public EntityPig(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 0.9F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    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));
}
项目:BaseClient    文件:EntityOcelot.java   
public EntityOcelot(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
项目:BaseClient    文件:EntityEnderman.java   
public EntityEnderman(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 2.9F);
    this.stepHeight = 1.0F;
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, false));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.tasks.addTask(10, new EntityEnderman.AIPlaceBlock(this));
    this.tasks.addTask(11, new EntityEnderman.AITakeBlock(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityEnderman.AIFindPlayer(this));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityEndermite.class, 10, true, false, new Predicate<EntityEndermite>()
    {
        public boolean apply(EntityEndermite p_apply_1_)
        {
            return p_apply_1_.isSpawnedByPlayer();
        }
    }));
}
项目:Mods    文件:EntityMerasmus.java   
protected void initEntityAI()
  {
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(4, new AIAttack(this));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));

this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
      this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityLivingBase>(this, EntityLivingBase.class,3, false,false,new Predicate<EntityLivingBase>(){

    @Override
    public boolean apply(EntityLivingBase input) {
        // TODO Auto-generated method stub
        return (input instanceof EntityTF2Character || input instanceof EntityPlayer) && getDistanceSqToEntity(input)<600;
    }

      }));
  }
项目:BaseClient    文件:EntityRabbit.java   
public EntityRabbit(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    this.jumpHelper = new EntityRabbit.RabbitJumpHelper(this);
    this.moveHelper = new EntityRabbit.RabbitMoveHelper(this);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.navigator.setHeightRequirement(2.5F);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityRabbit.AIPanic(this, 1.33D));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Items.golden_carrot, false));
    this.tasks.addTask(2, new EntityAITempt(this, 1.0D, Item.getItemFromBlock(Blocks.yellow_flower), false));
    this.tasks.addTask(3, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(5, new EntityRabbit.AIRaidFarm(this));
    this.tasks.addTask(5, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.aiAvoidWolves = new EntityRabbit.AIAvoidEntity(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
    this.tasks.addTask(4, this.aiAvoidWolves);
    this.setMovementSpeed(0.0D);
}
项目:BaseClient    文件:EntityHorse.java   
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
项目:BaseClient    文件:EntityVillager.java   
public EntityVillager(World worldIn, int professionId)
{
    super(worldIn);
    this.villagerInventory = new InventoryBasic("Items", false, 8);
    this.setProfession(professionId);
    this.setSize(0.6F, 1.8F);
    ((PathNavigateGround)this.getNavigator()).setBreakDoors(true);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.setCanPickUpLoot(true);
}
项目:BaseClient    文件:EntityPig.java   
public EntityPig(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 0.9F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    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));
}
项目:BaseClient    文件:EntityOcelot.java   
public EntityOcelot(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
项目:BaseClient    文件:EntitySkeleton.java   
public EntitySkeleton(World worldIn)
{
    super(worldIn);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIRestrictSun(this));
    this.tasks.addTask(3, new EntityAIFleeSun(this, 1.0D));
    this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityWolf.class, 6.0F, 1.0D, 1.2D));
    this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true));

    if (worldIn != null && !worldIn.isRemote)
    {
        this.setCombatTask();
    }
}
项目:BaseClient    文件:EntityEnderman.java   
public EntityEnderman(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 2.9F);
    this.stepHeight = 1.0F;
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, false));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.tasks.addTask(10, new EntityEnderman.AIPlaceBlock(this));
    this.tasks.addTask(11, new EntityEnderman.AITakeBlock(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityEnderman.AIFindPlayer(this));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityEndermite.class, 10, true, false, new Predicate<EntityEndermite>()
    {
        public boolean apply(EntityEndermite p_apply_1_)
        {
            return p_apply_1_.isSpawnedByPlayer();
        }
    }));
}
项目:BaseClient    文件:EntityWither.java   
public EntityWither(World worldIn)
{
    super(worldIn);
    this.setHealth(this.getMaxHealth());
    this.setSize(0.9F, 3.5F);
    this.isImmuneToFire = true;
    ((PathNavigateGround)this.getNavigator()).setCanSwim(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
    this.experienceValue = 50;
}
项目:connor41-etfuturum2    文件:EntityRabbit.java   
public EntityRabbit(World world) {
    super(world);
    moveType = EntityRabbit.EnumMoveType.HOP;
    carrotTicks = 0;
    setSize(0.4F, 0.5F);
    ReflectionHelper.setPrivateValue(EntityLiving.class, this, new EntityRabbit.RabbitJumpHelper(this), "jumpHelper", "field_70767_i");
    ReflectionHelper.setPrivateValue(EntityLiving.class, this, new EntityRabbit.RabbitMoveHelper(), "moveHelper", "field_70765_h");
    getNavigator().setAvoidsWater(true);
    //      navigator.func_179678_a(2.5F);
    tasks.addTask(1, new EntityAISwimming(this));
    tasks.addTask(1, new EntityRabbit.AIPanic(1.33D));
    tasks.addTask(2, new EntityAIMate(this, 0.8D));
    tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.carrot, false));
    tasks.addTask(5, new EntityRabbit.AIRaidFarm());
    tasks.addTask(5, new EntityAIWander(this, 0.6D));
    tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    tasks.addTask(4, new EntityAIAvoidEntity(this, EntityWolf.class, 16.0F, 1.33D, 1.33D));
    tasks.addTask(4, new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 0.8D, 1.33D));
    setMovementSpeed(0.0D);
}
项目:CustomWorldGen    文件:EntityEnderman.java   
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, false));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.tasks.addTask(10, new EntityEnderman.AIPlaceBlock(this));
    this.tasks.addTask(11, new EntityEnderman.AITakeBlock(this));
    this.targetTasks.addTask(1, new EntityEnderman.AIFindPlayer(this));
    this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityEndermite.class, 10, true, false, new Predicate<EntityEndermite>()
    {
        public boolean apply(@Nullable EntityEndermite p_apply_1_)
        {
            return p_apply_1_.isSpawnedByPlayer();
        }
    }));
}
项目:CustomWorldGen    文件:EntityVillager.java   
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
项目:Backmemed    文件:EntityWolf.java   
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, new EntityWolf.AIAvoidEntity(this, EntityLlama.class, 24.0F, 1.5D, 1.5D));
    this.tasks.addTask(4, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(5, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(6, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
    this.tasks.addTask(7, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(9, new EntityAIBeg(this, 8.0F));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(10, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
    this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
    this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0]));
    this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
        }
    }));
    this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, AbstractSkeleton.class, false));
}
项目:Backmemed    文件:EntityVillager.java   
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEvoker.class, 12.0F, 0.8D, 0.8D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVindicator.class, 8.0F, 0.8D, 0.8D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVex.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWanderAvoidWater(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
项目:Backmemed    文件:EntityOcelot.java   
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.aiTempt = new EntityAITempt(this, 0.6D, Items.FISH, true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt);
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWanderAvoidWater(this, 0.8D, 1.0000001E-5F));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
项目:Backmemed    文件:EntityEvoker.java   
protected void initEntityAI()
{
    super.initEntityAI();
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityEvoker.AICastingSpell());
    this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityPlayer.class, 8.0F, 0.6D, 1.0D));
    this.tasks.addTask(4, new EntityEvoker.AISummonSpell());
    this.tasks.addTask(5, new EntityEvoker.AIAttackSpell());
    this.tasks.addTask(6, new EntityEvoker.AIWololoSpell());
    this.tasks.addTask(8, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityEvoker.class}));
    this.targetTasks.addTask(2, (new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)).func_190882_b(300));
    this.targetTasks.addTask(3, (new EntityAINearestAttackableTarget(this, EntityVillager.class, false)).func_190882_b(300));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, false));
}
项目:harshencastle    文件:EntitySoullessKnight.java   
public EntitySoullessKnight(World worldIn) {
    super(worldIn);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(0, new EntityAIAttackMelee(this, 1d, true));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEnderman.class, 50f, 1d, 2d));
    this.tasks.addTask(0, new AIEntityWanderNoWater(this, 1d, 0));
    this.tasks.addTask(0, new EntityAIMoveTowardsTarget(this, 1d, 100));

    this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
       this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));

    this.experienceValue = 50;
}
项目:harshencastle    文件:EntityHarshenSoul.java   
@Override
protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(0, new EntityAIAttackMelee(this, 1d, true));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEnderman.class, 10f, 1d, 1.2d));
    this.tasks.addTask(0, new EntityAIWanderAvoidWater(this, 0.35));
    this.tasks.addTask(0, new EntityAIMoveTowardsTarget(this, 0.5d, 100));

    this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
项目:Infernum    文件:EntityPigZombieMage.java   
protected void initEntityAI() {
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.applyEntityAI();
}