@Override public void setCombatTask() { if (aiAttackOnCollide != null) { this.tasks.removeTask(aiAttackOnCollide); } aiAttackOnCollide = new EntityAIAttackMelee(this, this.getBaseSprintModifier(getType()), false); this.tasks.addTask(attackPriority, aiAttackOnCollide); }
public EntityBasicHunter(World world) { super(world, true); saveHome = true; ((PathNavigateGround) this.getNavigator()).setEnterDoors(true); this.setSize(0.6F, 1.95F); this.setDontDropEquipment(); this.attackMelee = new EntityAIAttackMelee(this, 1.0, false); this.attackRange = new EntityAIAttackRangedCrossbow(this, this, 0.6, 60, 20); this.updateCombatTask(); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIAttackMelee(this, 0.5D, true)); targetTasks.addTask(0, new EntityAIHurtByTarget(this, false)); targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, false)); }
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, ZooConfig.fallenMountChargeSpeed.get(), false); updateAttackAI(); }
@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)); }
@SuppressWarnings("unchecked") @Override protected void initEntityAI() { this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.6D, 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.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 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 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)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(2, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_1, true)); 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)); }
@SuppressWarnings("unchecked") @Override protected void initEntityAI() { this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.5D, 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.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); }
@SuppressWarnings("unchecked") @Override protected void initEntityAI() { this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.8D, 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.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); }
@SuppressWarnings("unchecked") @Override protected void initEntityAI() { this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.7D, 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.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, true)); this.tasks.addTask(7, new EntityAIWander(this, 0.9F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 16)); this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true, false, null)); this.targetTasks.addTask(2, 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 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)); targetTasks.addTask(2, new EntityAIGaiaValidateTargetPlayer(this)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, 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)); targetTasks.addTask(2, new EntityGaiaEnderDragonGirl.AIFindPlayer(this)); }
public EntityWitherCat(World world) { super(world); 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); }
@Override protected void initEntityAI() { aiFlyingWander = new EntityAIFlyingWander(this, 0.5D, 20); tasks.addTask(0, new EntityAIPolinate(this, 10)); tasks.addTask(1, new EntityAISwimming(this)); tasks.addTask(2, new EntityAIAttackMelee(this, 0.3D, true)); //tasks.addTask(3, new EntityAITempt(this, 0.5D, Items.SUGAR, false)); tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); tasks.addTask(6, new EntityAILookIdle(this)); targetTasks.addTask(0, new EntityAIHurtByTarget(this, true)); targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityWasp.class, true)); }
@Override protected void initEntityAI() { tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIRestrictSun(this)); tasks.addTask(2, new EntityAIFleeSun(this, EntityAttributes.ATTACK_SPEED_2)); tasks.addTask(3, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_2, true)); tasks.addTask(4, new EntityAIWander(this, 1.0D)); tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(5, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }
protected void initEntityAI() { this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new StymphalianBirdAIFlee(this, 10)); this.tasks.addTask(3, new EntityAIAttackMelee(this, 1.5D, false)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new StymphalianBirdAIAirTarget(this)); this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityLivingBase.class, 6.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[0])); this.targetTasks.addTask(2, new StymphalianBirdAITarget(this, EntityLivingBase.class, true)); }
protected void initEntityAI() { this.tasks.addTask(1, new TrollAIFleeSun(this, 1.0D)); this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, true)); this.tasks.addTask(3, new EntityAIWanderAvoidWater(this, 1.0D)); this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F, 1.0F)); this.tasks.addTask(4, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0])); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, false)); ((PathNavigateGround) this.getNavigator()).setAvoidSun(true); }