@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, ARENA_RANGE * 1.5F)); }
@Override public boolean shouldExecute() { //just a minor modification from vanilla that will always prefer to watch attacked target closestEntity = entity.getAttackTarget(); return closestEntity != null || super.shouldExecute(); } }
public boolean shouldContinueExecuting() { if (this.closestEntity != null && this.closestEntity instanceof EntityPlayer && ((EntityPlayer) this.closestEntity).isCreative()) { return false; } return super.shouldContinueExecuting(); } });
@Override protected void initEntityAI() { tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 50.0F)); applyEntityAI(); }
public boolean shouldExecute(){ return super.shouldExecute() && closestEntity != null && closestEntity.isRidingOrBeingRiddenBy(entity); } }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 10, 1)); }
@Override public boolean shouldExecute() { if (this.entity instanceof EntityDragonBase && !((EntityDragonBase) this.entity).canMove() || ((EntityDragonBase) this.entity).getAnimation() == EntityDragonBase.ANIMATION_SHAKEPREY) { return false; } return super.shouldExecute(); } }
@Override protected void initEntityAI() { tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 50.0F)); applyEntityAI(); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwim(this)); tasks.addTask(1, new EntityAITalkingTo(this)); tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F)); tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F)); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.GOLD_INGOT, false)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); }
public EntityDrone(World worldIn) { super(worldIn); this.setSize(8f / 16f, 8f / 16f); this.moveHelper = new DroneMoveHelper(this); this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityLivingBase.class, 8.0F)); this.tasks.addTask(3, new EntityAIFollowCreator<>(this, 0.2f, 5f, 3.0F)); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityGaiaBanshee.AIChargeAttack()); this.tasks.addTask(8, new EntityGaiaBanshee.AIMoveRandom()); 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[] { EntityGaiaBanshee.class })); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_0, true)); tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(1, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_0, true)); tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(1, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAIAntlionBossAttack<EntityPlayer>(this, EntityPlayer.class, 0.6D, true)); tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 16.0F)); targetTasks.addTask(0, new EntityAIHurtByTarget(this, false)); targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, false)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIErebusAttackMelee(this, 0.3D, false)); tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); tasks.addTask(3, new EntityAIWanderAvoidWater(this, 0.3D)); tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(5, new EntityAILookIdle(this)); targetTasks.addTask(0, new EntityAIHurtByTarget(this, false)); targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(6, new EntityAIAttackMelee(this, 1.0, false)); this.tasks.addTask(15, new EntityAIWander(this, 0.7)); this.tasks.addTask(16, new EntityAIWatchClosest(this, EntityPlayer.class, 10)); this.targetTasks.addTask(8, new MinionAIHurtByTarget(this, false)); } }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); 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, true)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_1, true)); tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F)); tasks.addTask(2, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_2, true)); tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 2.0F, 1.0F)); tasks.addTask(2, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }