net.minecraft.entity.ai.EntityAILookIdle Java Examples

The following examples show how to use net.minecraft.entity.ai.EntityAILookIdle. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityWitherCat.java    From EnderZoo with Creative Commons Zero v1.0 Universal 6 votes vote down vote up
public EntityWitherCat(World world) {
  super(world);

  followTask = new EntityAIFollowOwner(this, 2.5, 5, 1);
  EntityAIFollowOwner retreatTask = new EntityAIFollowOwner(this, 2.5, 5, 2.5);

  tasks.addTask(1, new EntityAISwimming(this));
  tasks.addTask(2, new EntityAIAttackOnCollideOwned(this, EntityPlayer.class, 2.5, false, retreatTask));
  tasks.addTask(3, followTask);
  tasks.addTask(4, new EntityAIWander(this, 1.0D));
  tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  tasks.addTask(6, new EntityAILookIdle(this));
  tasks.addTask(7, new EntityAIAttackMelee(this, 1.0D, true));

  setSize(DEF_WIDTH, DEF_HEIGHT);
}
 
Example #2
Source File: EntityDireWolf.java    From EnderZoo with Creative Commons Zero v1.0 Universal 6 votes vote down vote up
public EntityDireWolf(World world) {
    super(world);
    setSize(0.8F, 1.2F);
    //getNavigator().setAvoidsWater(true);
//    ((PathNavigateGround) this.getNavigator()).setAvoidsWater(true);
    tasks.addTask(1, new EntityAISwimming(this));
    tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
    tasks.addTask(4, new EntityAIAttackOnCollideAggressive(this, 1.1D, true).setAttackFrequency(20));
    tasks.addTask(7, new EntityAIWander(this, 0.5D));
    tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(9, new EntityAILookIdle(this));
    targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));

    if(Config.direWolfAggresiveRange > 0) {      
      EntityAINearestAttackableTargetBounded<EntityPlayer> nearTarg = new EntityAINearestAttackableTargetBounded<EntityPlayer>(this, EntityPlayer.class, true);
      nearTarg.setMaxDistanceToTarget(Config.direWolfAggresiveRange);
      targetTasks.addTask(2, nearTarg);
    }
  }
 
Example #3
Source File: EntityEnderminy.java    From EnderZoo with Creative Commons Zero v1.0 Universal 6 votes vote down vote up
public EntityEnderminy(World world) {
  super(world);
  setSize(0.6F * 0.5F, 2.9F * 0.25F);
  stepHeight = 1.0F;

  tasks.addTask(0, new EntityAISwimming(this));
  tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, false));
  tasks.addTask(7, new EntityAIWander(this, 1.0D));
  tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  tasks.addTask(8, new EntityAILookIdle(this));
  targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));

  if(attackIfLookingAtPlayer) {
    targetTasks.addTask(2, new AIFindPlayer());
  }

  if(attackCreepers) {
    targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityCreeper>(this, EntityCreeper.class, true, true));
  }
}
 
Example #4
Source File: EntityGuard.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
protected void initEntityAI() {
	areaAI = new EntityAIMoveIntoArea(this, 0.5D, 30);
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAttackMelee(this, 0.6D, false));
	tasks.addTask(4, areaAI);
	tasks.addTask(7, new EntityAIWander(this, 0.35D));
	tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(8, new EntityAILookIdle(this));

	targetTasks.addTask(2, new EntityAINearestAttackableCivTarget(this));
	targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityMob>(this, EntityMob.class, 10, false, false, new Predicate<EntityMob>() {
		@Override
		public boolean apply(EntityMob target) {
			return !(target instanceof EntityCreeper);
		}
	}));
}
 
Example #5
Source File: EntityElk.java    From TFC2 with GNU General Public License v3.0 6 votes vote down vote up
public EntityElk(World worldIn) 
{
	super(worldIn);
	this.setSize(1.5F, 1.8F);
	((PathNavigateGround)this.getNavigator()).setCanSwim(true);
	this.tasks.addTask(0, new EntityAISmartSwim(this));
	this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.8D, true));
	this.tasks.addTask(5, new EntityAIFollowParent(this, 0.8D));	
	aiHerdMove = new EntityAIHerdMove(this, 0.5D);
	this.tasks.addTask(6, aiHerdMove);
	this.tasks.addTask(7, new EntityAIWanderHex(this, 0.5D));
	//this.tasks.addTask(7, new EntityAIWander(this, 0.5D));
	//this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	this.tasks.addTask(8, new EntityAILookIdle(this));
	this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true, new Class[0]));//The array seems to be for class types that this task should ignore
	setGender(worldIn.rand.nextBoolean() ? Gender.Male : Gender.Female);
}
 
Example #6
Source File: BodyguardGolemCore.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void setupGolem(EntityGolemBase golem) {
    WrappedGolem wrapped = new WrappedGolem(golem);

    golem.setHomeArea(0, 300000000, 0, 300000000);
    golem.setMarkers(new ArrayList<Marker>());

    golem.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(wrapped));
    golem.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(wrapped));
    golem.targetTasks.addTask(3, new EntityAIHurtByTarget(golem, true));

    golem.tasks.addTask(1, new AISit(golem));

    if (golem.decoration.contains("R")) {
        golem.tasks.addTask(2, new AIUncheckedDartAttack(golem));
    }
    golem.tasks.addTask(3, new AIUncheckedAttackOnCollide(golem));
    golem.tasks.addTask(4, new AIFollowOwner(wrapped, 5, 2));

    golem.tasks.addTask(5, new AIOpenDoor(golem, true));
    golem.tasks.addTask(7, new EntityAIWatchClosest(golem, EntityPlayer.class, 6.0F));
    golem.tasks.addTask(8, new EntityAILookIdle(golem));
}
 
Example #7
Source File: EntityClayGolem.java    From Artifacts with MIT License 5 votes vote down vote up
public EntityClayGolem(World par1World)
{
    super(par1World);
    //this.moveSpeed = 0.16F;
    /*this.setSize(1.4F, 2.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0.288D, false));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityZombie.class, 0.288D, true));
    this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 0.16D));
    this.tasks.addTask(4, new EntityAIWander(this, 0.16D));
    this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityZombie.class, 0, true));
    //this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true, true, IMob.mobSelector));
    //this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityZombie.class, 0, false, true, IMob.mobSelector));*/
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
    this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true));
    this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, 1.0D, false));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false));
}
 
Example #8
Source File: EntityPenguin.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI() {
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(0,
			new EntityAIAvoidEntity<EntityPolarBear>(this, EntityPolarBear.class, 16, 0.5D, 1.5D));
	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, Items.FISH, false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(6, new EntityAIMate(this, 0.5D));
	this.tasks.addTask(7, new EntityAILookIdle(this));
}
 
Example #9
Source File: EntityWitherWitch.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
public EntityWitherWitch(World world) {
  super(world);
  rangedAttackAI = new EntityAIRangedAttack(this, 1, 60, 10);
  tasks.addTask(1, new EntityAISwimming(this));
  tasks.addTask(1, new EntityAISwimming(this));    
  tasks.addTask(2, rangedAttackAI);
  tasks.addTask(2, new EntityAIWander(this, 1.0D));
  tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  tasks.addTask(3, new EntityAILookIdle(this));
  targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
  targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, true));
}
 
Example #10
Source File: EntityOwl.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
public EntityOwl(World worldIn) {
  super(worldIn);
  setSize(0.4F, 0.85F);
  stepHeight = 1.0F;

  
  int pri = 0;
  tasks.addTask(++pri, new EntityAIFlyingPanic(this, 2));
  tasks.addTask(++pri, new EntityAIFlyingAttackOnCollide(this, 2.5, false));    
  tasks.addTask(++pri, new EntityAIMate(this, 1.0));
  tasks.addTask(++pri, new EntityAITempt(this, 1.0D, Items.SPIDER_EYE, false));
  tasks.addTask(++pri, new EntityAIFollowParent(this, 1.5));
  tasks.addTask(++pri, new EntityAIFlyingLand(this, 2));
  tasks.addTask(++pri, new EntityAIFlyingFindPerch(this, 2, 80));
  tasks.addTask(++pri, new EntityAIFlyingShortWander(this, 2, 150));

  tasks.addTask(++pri, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
  tasks.addTask(++pri, new EntityAILookIdle(this));

  EntityAINearestAttackableTargetBounded<EntitySpider> targetSpiders = new EntityAINearestAttackableTargetBounded<EntitySpider>(this, EntitySpider.class,
      true, true);
  targetSpiders.setMaxDistanceToTarget(12);
  targetSpiders.setMaxVerticalDistanceToTarget(24);
  targetTasks.addTask(0, targetSpiders);

  moveHelper = new FlyingMoveHelper(this);

  timeUntilNextEgg = getNextLayingTime();
}
 
Example #11
Source File: EntityFallenMount.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
public EntityFallenMount(World world) {
  super(world);
  setGrowingAge(0);
  setHorseSaddled(true);

  tasks.taskEntries.clear();
  tasks.addTask(0, new EntityAISwimming(this));
  tasks.addTask(6, new EntityAIWander(this, 1.2D));
  tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
  tasks.addTask(8, new EntityAILookIdle(this));

  findTargetAI = new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, true);
  attackAI = new EntityAIAttackMelee(this, MOUNTED_ATTACK_MOVE_SPEED, false);
  updateAttackAI(); 
}
 
Example #12
Source File: EntityEasterCow.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void initEntityAI() {
  tasks.addTask(0, new EntityAISwimming(this));
  tasks.addTask(1, new EntityAIPanic(this, 2.0D));
  tasks.addTask(2, new EntityAIMate(this, 1.0D));
  tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.GOLDEN_CARROT, false));
  tasks.addTask(4, new EntityAIAvoidEntity<EntityPlayer>
      (this, EntityPlayer.class, 8.0F, 2.2D, 2.2D));
  tasks.addTask(4, new EntityAIAvoidEntity<EntityWolf>
      (this, EntityWolf.class, 10.0F, 2.2D, 2.2D));
  tasks.addTask(6, new EntityAIWander(this, 0.6D));
  tasks.addTask(7, new EntityAILookIdle(this));
  tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
}
 
Example #13
Source File: EntityEndermanFighter.java    From enderutilities with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
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(6, new EntityEndermanFighter.AIDespawn(this, 200));

    this.targetTasks.addTask(1, new EntityEndermanFighter.AIAttackAssignedTarget(this, true));
    this.targetTasks.addTask(2, new EntityEndermanFighter.AIAttackRevengeTarget(this, false));
    this.targetTasks.addTask(3, new EntityEndermanFighter.AIAttackClosestPlayer(this, false));
}
 
Example #14
Source File: EntityEndermite.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
public EntityEndermite(World world) {
	super(world);
	sorter = new EntityAINearestAttackableTarget.Sorter(this);

	experienceValue = 3;
	setSize(0.4F, 0.3F);
	tasks.addTask(1, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
	tasks.addTask(3, new EntityAIWander(this, 1.0D));
	tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(8, new EntityAILookIdle(this));
	targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 10, true));
}
 
Example #15
Source File: BreakGolemCore.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void setupGolem(EntityGolemBase golem) {
    golem.tasks.addTask(0, new AIBreakBlock(golem));
    golem.tasks.addTask(5, new AIOpenDoor(golem, true));
    golem.tasks.addTask(6, new AIReturnHome(golem));
    golem.tasks.addTask(7, new EntityAIWatchClosest(golem, EntityPlayer.class, 6.0F));
    golem.tasks.addTask(8, new EntityAILookIdle(golem));
}
 
Example #16
Source File: EntityToro.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void initEntityAI() {
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
	this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.75, false));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
Example #17
Source File: EntityRainbowGuard.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void ai() {
	tasks.addTask(1, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAtAttention(this));
	tasks.addTask(4, new EntityAIAttackMelee(this, 0.5D, false));
	tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(5, new EntityAILookIdle(this));
	targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
 
Example #18
Source File: EntityBas.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void ai() {
	tasks.addTask(1, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAttackMelee(this, 0.5D, false));
	tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(3, new EntityAILookIdle(this));
	targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
 
Example #19
Source File: EntityMage.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void ai() {
	tasks.addTask(1, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAttackRanged(this, 1.0D, 16, 10.0F));
	tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(3, new EntityAILookIdle(this));
	targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
 
Example #20
Source File: EntitySentry.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void initEntityAI() {
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(2, new EntityAIAttackMelee(this, 0.5D, false));
	tasks.addTask(7, new EntityAIWander(this, 0.35D));
	tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(8, new EntityAILookIdle(this));

	targetTasks.addTask(2, new EntityAINearestAttackableCivTarget(this));
	targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityMob>(this, EntityMob.class, 2, false, false, new Predicate<EntityMob>() {
		@Override
		public boolean apply(EntityMob target) {
			return !(target instanceof EntityCreeper);
		}
	}));
}
 
Example #21
Source File: EntityVillageLord.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void initEntityAI() {
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(1, new EntityAIPanic(this, 1.0D));
	tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(8, new EntityAILookIdle(this));
	if (isEntityAlive()) {
		setHasLord(true);
	}
}
 
Example #22
Source File: EntityMoby.java    From mobycraft with Apache License 2.0 5 votes vote down vote up
public EntityMoby(World worldIn)
{
    super(worldIn);
    this.setSize(1.8F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(false);
    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, Items.fish, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
}
 
Example #23
Source File: EntityHamster.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
public EntityHamster(World worldIn) {
    super(worldIn);
    setSize(0.4F, 0.2F);
    ((PathNavigateGround) getNavigator()).setAvoidsWater(true);
    tasks.addTask(1, new EntityAIFollowOwner(this, 1f, 10f, 2f));
    tasks.addTask(2, new EntityAIWander(this, 1));
    tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayerSP.class, 8f));
    tasks.addTask(3, new EntityAILookIdle(this));
    setTamed(true);
    preventEntitySpawning = false;
}
 
Example #24
Source File: TransIconHerobrineButWithBetterPantsEntity.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIWander(this, 0.6));
    this.tasks.addTask(2, new EntityAIAttackRanged(this, 0.6, 20, 6.0F));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 32.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, NotchButWithWorsererPantsEntity.class, false));
}
 
Example #25
Source File: EntityExplodingChicken.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI()
   {
       this.tasks.addTask(0, new EntityAISwimming(this));
       this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
       this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
       this.tasks.addTask(3, new EntityAITemptAndExplode(this, 1.0D, false, TEMPTATION_ITEMS));
       this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
       this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
       this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
       this.tasks.addTask(7, new EntityAILookIdle(this));
   }
 
Example #26
Source File: NotchButWithWorsererPantsEntity.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}