@Override public void onEnable(EntityTameableDragon dragon) { EntityAIRestrictSun restrictSun = new EntityAIRestrictSun(dragon); dragon.tasks.addTask(2, restrictSun); appliedTasks.put(dragon, restrictSun); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.taskEntries.removeIf(entry -> entry.action instanceof EntityAIMoveIndoors || entry.action instanceof EntityAIVillagerMate || entry.action instanceof EntityAIFollowGolem); tasks.addTask(0, new EntityAIRestrictSun(this)); tasks.addTask(1, new EntityAIAvoidEntity<>(this, EntityCreature.class, VampirismAPI.factionRegistry().getPredicate(getFaction(), true, true, false, false, VReference.HUNTER_FACTION), 10, 0.45F, 0.55F)); tasks.addTask(2, new EntityAIMoveIndoorsDay(this)); tasks.addTask(5, new VampireAIFleeSun(this, 0.6F, true)); tasks.addTask(6, new EntityAIAttackMelee(this, 0.6F, false)); tasks.addTask(7, new VampireAIBiteNearbyEntity(this)); tasks.addTask(9, new VampireAIMoveToBiteable(this, 0.55F)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }
@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)); }
@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_3)); tasks.addTask(3, new EntityAIAttackMelee(this, EntityAttributes.ATTACK_SPEED_3, true)); tasks.addTask(4, new EntityAIWander(this, 1.0D)); tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F)); tasks.addTask(5, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); }
protected void initEntityAI() { this.tasks.addTask(2, new EntityAIRestrictSun(this)); this.tasks.addTask(3, new EntityAIFleeSun(this, 1.0D)); this.tasks.addTask(3, new CyclopsAIAttackMelee(this, 1.0D, false)); this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F, 1.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, EntityLivingBase.class, 0, true, true, new Predicate<EntityLivingBase>() { @Override public boolean apply(@Nullable EntityLivingBase entity) { return !EntityGorgon.isStoneMob(entity) && DragonUtils.isAlive(entity) && !(entity instanceof EntityWaterMob) && !(entity instanceof EntityPlayer) && !(entity instanceof EntityCyclops) && !EventLiving.isAnimaniaSheep(entity) && !(entity instanceof EntityAnimal && !(entity instanceof EntityWolf || entity instanceof EntityPolarBear || entity instanceof EntityDragonBase)) || entity instanceof EntityGorgon || entity instanceof EntityVillager; } })); this.targetTasks.addTask(3, new CyclopsAITargetSheepPlayers(this, EntityPlayer.class, 0, true, true, new Predicate<Entity>() { @Override public boolean apply(@Nullable Entity entity) { return true; } })); }
@Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(1, new EntityAIAvoidEntity<>(this, EntityCreature.class, VampirismAPI.factionRegistry().getPredicate(getFaction(), false, true, false, false, VReference.HUNTER_FACTION), 10, 1.0, 1.1)); //this.tasks.addTask(3, new VampireAIFleeSun(this, 1F)); this.tasks.addTask(4, new EntityAIRestrictSun(this)); tasks.addTask(5, new EntityAIAttackMeleeNoSun(this, 0.9D, false)); this.experienceValue = 2; this.tasks.addTask(11, new EntityAIWander(this, 0.7)); this.tasks.addTask(13, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(15, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, 5, true, false, VampirismAPI.factionRegistry().getPredicate(getFaction(), true, false, true, false, null))); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<>(this, EntityCreature.class, 5, true, false, VampirismAPI.factionRegistry().getPredicate(getFaction(), false, true, false, false, null))); }
protected void initEntityAI() { 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, aiStare = new GorgonAIStareAttack(this, 1.0D, 0, 15.0F));