Search in sources :

Example 1 with EntityAIHurtByTarget

use of team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget in project ChocolateQuestRepoured by TeamChocoQuest.

the class EntityCQREnderCalamity method registerGoals.

@Override
protected void registerGoals() {
    super.registerGoals();
    this.teleportAI = new BossAITeleportAroundHome(this, 40);
    this.goalSelector.addGoal(8, this.teleportAI);
    this.goalSelector.addGoal(4, new BossAIStunned(this));
    this.tennisAI = new BossAIEnergyTennis(this);
    this.goalSelector.addGoal(5, this.tennisAI);
    this.blockThrowerAI = new BossAIBlockThrower(this);
    this.goalSelector.addGoal(6, this.blockThrowerAI);
    this.goalSelector.addGoal(6, new BossAICalamityBuilding(this));
    this.goalSelector.addGoal(5, new BossAIEndLaser(this));
    this.goalSelector.addGoal(6, new BossAICalamityHealing(this));
    this.goalSelector.addGoal(8, new BossAISummonMinions(this));
    this.goalSelector.addGoal(8, new BossAIAreaLightnings(this, ARENA_RADIUS));
    this.goalSelector.addGoal(7, new BossAIRandomTeleportEyes(this));
    this.goalSelector.addGoal(7, new BossAIRandomTeleportLaser(this));
    this.targetSelector.availableGoals.clear();
    this.targetSelector.addGoal(0, new EntityAINearestAttackTargetAtHomeArea<>(this));
    this.targetSelector.addGoal(2, new EntityAICQRNearestAttackTarget(this));
    this.targetSelector.addGoal(1, new EntityAIHurtByTarget(this));
}
Also used : BossAIBlockThrower(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIBlockThrower) BossAIStunned(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIStunned) BossAISummonMinions(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAISummonMinions) BossAIRandomTeleportLaser(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIRandomTeleportLaser) BossAITeleportAroundHome(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAITeleportAroundHome) EntityAIHurtByTarget(team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget) BossAICalamityBuilding(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAICalamityBuilding) BossAIAreaLightnings(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIAreaLightnings) BossAIRandomTeleportEyes(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIRandomTeleportEyes) BossAIEndLaser(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIEndLaser) BossAICalamityHealing(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAICalamityHealing) EntityAICQRNearestAttackTarget(team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget) BossAIEnergyTennis(team.cqr.cqrepoured.entity.ai.boss.endercalamity.BossAIEnergyTennis)

Example 2 with EntityAIHurtByTarget

use of team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget in project ChocolateQuestRepoured by TeamChocoQuest.

the class EntityCQRGiantTortoise method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, new BossAITortoiseSwimming(this));
    this.goalSelector.addGoal(2, new BossAITortoiseStun(this));
    this.goalSelector.addGoal(4, new BossAITortoiseHealing(this));
    this.goalSelector.addGoal(6, new BossAITortoiseSpinAttack(this));
    this.goalSelector.addGoal(19, new BossAITortoiseMoveToLeader(this));
    this.goalSelector.addGoal(20, new BossAITortoiseMoveToHome(this));
    this.goalSelector.addGoal(21, new EntityAIIdleSit(this) {

        @Override
        public boolean canUse() {
            if (super.canUse() && ((EntityCQRGiantTortoise) this.entity).isInShell() && !EntityCQRGiantTortoise.this.isHealing && !EntityCQRGiantTortoise.this.isStunned() && !EntityCQRGiantTortoise.this.isSpinning()) {
                return true;
            } else if (super.canUse() && !EntityCQRGiantTortoise.this.isHealing && !EntityCQRGiantTortoise.this.isStunned() && !EntityCQRGiantTortoise.this.isSpinning()) {
                if (EntityCQRGiantTortoise.this.getCurrentAnimationId() != ANIMATION_ID_IN_SHELL) {
                    if (EntityCQRGiantTortoise.this.getCurrentAnimationId() == ANIMATION_ID_WALK) {
                        EntityCQRGiantTortoise.this.setNextAnimation(ANIMATION_ID_ENTER_SHELL);
                    }
                }
            }
            return false;
        }
    });
    this.targetSelector.addGoal(0, new EntityAICQRNearestAttackTarget(this));
    this.targetSelector.addGoal(1, new EntityAIHurtByTarget(this));
}
Also used : BossAITortoiseSwimming(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseSwimming) BossAITortoiseMoveToHome(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseMoveToHome) BossAITortoiseHealing(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseHealing) BossAITortoiseMoveToLeader(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseMoveToLeader) EntityAICQRNearestAttackTarget(team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget) BossAITortoiseSpinAttack(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseSpinAttack) EntityAIIdleSit(team.cqr.cqrepoured.entity.ai.EntityAIIdleSit) EntityAIHurtByTarget(team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget) BossAITortoiseStun(team.cqr.cqrepoured.entity.ai.boss.gianttortoise.BossAITortoiseStun)

Example 3 with EntityAIHurtByTarget

use of team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget in project ChocolateQuestRepoured by TeamChocoQuest.

the class AbstractEntityCQR method registerGoals.

@Override
protected void registerGoals() {
    if (CQRConfig.advanced.debugAI) {
    // TODO: AI Selectors are final now, change this or not?
    // this.goalSelector = new EntityAITasksProfiled((IProfiler) this.level.getProfiler(), this.level);
    // this.targetSelector = new EntityAITasksProfiled((IProfiler) this.level.getProfiler(), this.level);
    }
    this.spellHandler = this.createSpellHandler();
    this.goalSelector.addGoal(0, new SwimGoal(this));
    this.goalSelector.addGoal(1, new EntityAIOpenCloseDoor(this));
    if (this.canMountEntity()) {
        this.horseAI = new EntityAIRideHorse<>(this, 1.5);
        this.goalSelector.addGoal(8, this.horseAI);
    }
    this.goalSelector.addGoal(9, new EntityAIHealingPotion(this));
    this.goalSelector.addGoal(11, this.spellHandler);
    this.goalSelector.addGoal(12, new EntityAIAttackSpecial(this));
    this.goalSelector.addGoal(13, new EntityAIAttackRanged<>(this));
    this.goalSelector.addGoal(14, new EntityAIPotionThrower(this));
    this.goalSelector.addGoal(15, new EntityAIFireball(this));
    this.goalSelector.addGoal(16, new EntityAIHooker(this));
    this.goalSelector.addGoal(17, new EntityAIBackstab(this));
    this.goalSelector.addGoal(18, new EntityAIAttack(this));
    this.goalSelector.addGoal(19, new EntityAICursedBoneSummoner(this));
    this.goalSelector.addGoal(20, new EntityAIFollowAttackTarget(this));
    this.goalSelector.addGoal(22, new EntityAIFireFighter(this));
    this.goalSelector.addGoal(23, new EntityAITorchIgniter(this));
    this.goalSelector.addGoal(24, new EntityAILooter(this));
    this.goalSelector.addGoal(25, new EntityAITameAndLeashPet(this));
    this.goalSelector.addGoal(26, new EntityAISearchMount(this));
    this.goalSelector.addGoal(30, new EntityAIMoveToLeader(this));
    this.goalSelector.addGoal(31, new EntityAIFollowPath(this));
    this.goalSelector.addGoal(32, new EntityAIMoveToHome(this));
    this.goalSelector.addGoal(33, new EntityAIIdleSit(this));
    // Electrocution stuff
    // this.tasks.addTask(10, new EntityAIPanicElectrocute(this, 2.0D));
    // this.tasks.addTask(10, new EntityAIPanicFire(this, 2.0D));
    // this.tasks.addTask(3, new EntityAIAvoidEntity<EntityLivingBase>(this, EntityLivingBase.class,
    // TargetUtil.PREDICATE_IS_ELECTROCUTED, 8.0F, 1.5D, 2.0D));
    // this.tasks.addTask(2, new EntityAIAvoidEntity<EntityElectricField>(this, EntityElectricField.class, 1.0F, 1.5D,
    // 1.5D));
    this.targetSelector.addGoal(0, new EntityAICQRNearestAttackTarget(this));
    this.targetSelector.addGoal(1, new EntityAIHurtByTarget(this));
}
Also used : EntityAIFollowPath(team.cqr.cqrepoured.entity.ai.EntityAIFollowPath) EntityAIPotionThrower(team.cqr.cqrepoured.entity.ai.item.EntityAIPotionThrower) EntityAIAttack(team.cqr.cqrepoured.entity.ai.attack.EntityAIAttack) EntityAICursedBoneSummoner(team.cqr.cqrepoured.entity.ai.item.EntityAICursedBoneSummoner) EntityAIMoveToHome(team.cqr.cqrepoured.entity.ai.EntityAIMoveToHome) EntityAIHealingPotion(team.cqr.cqrepoured.entity.ai.item.EntityAIHealingPotion) EntityAIHurtByTarget(team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget) EntityAITameAndLeashPet(team.cqr.cqrepoured.entity.ai.EntityAITameAndLeashPet) EntityAIMoveToLeader(team.cqr.cqrepoured.entity.ai.EntityAIMoveToLeader) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) EntityAITorchIgniter(team.cqr.cqrepoured.entity.ai.EntityAITorchIgniter) EntityAILooter(team.cqr.cqrepoured.entity.ai.attack.special.EntityAILooter) EntityAIOpenCloseDoor(team.cqr.cqrepoured.entity.ai.EntityAIOpenCloseDoor) EntityAIFireFighter(team.cqr.cqrepoured.entity.ai.EntityAIFireFighter) EntityAICQRNearestAttackTarget(team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget) EntityAIIdleSit(team.cqr.cqrepoured.entity.ai.EntityAIIdleSit) EntityAIAttackSpecial(team.cqr.cqrepoured.entity.ai.attack.special.EntityAIAttackSpecial) EntityAIHooker(team.cqr.cqrepoured.entity.ai.attack.special.EntityAIHooker) EntityAIFollowAttackTarget(team.cqr.cqrepoured.entity.ai.EntityAIFollowAttackTarget) EntityAIFireball(team.cqr.cqrepoured.entity.ai.item.EntityAIFireball) EntityAIBackstab(team.cqr.cqrepoured.entity.ai.attack.EntityAIBackstab) EntityAISearchMount(team.cqr.cqrepoured.entity.ai.EntityAISearchMount) IHasTextureOverride(team.cqr.cqrepoured.customtextures.IHasTextureOverride)

Example 4 with EntityAIHurtByTarget

use of team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget in project ChocolateQuestRepoured by TeamChocoQuest.

the class EntityCQRGiantSpider method registerGoals.

@Override
protected void registerGoals() {
    this.spellHandler = this.createSpellHandler();
    this.goalSelector.addGoal(0, new SwimGoal(this));
    this.goalSelector.addGoal(1, new BossAISpiderSummonMinions(this));
    this.goalSelector.addGoal(2, new BossAISpiderWebshot(this));
    this.goalSelector.addGoal(3, new BossAISpiderHook(this));
    this.goalSelector.addGoal(12, new BossAISpiderLeapAttack(this, 1.2F));
    this.goalSelector.addGoal(14, new EntityAIAttack(this));
    this.goalSelector.addGoal(20, new EntityAIFollowAttackTarget(this));
    this.goalSelector.addGoal(30, new EntityAIMoveToLeader(this));
    this.goalSelector.addGoal(31, new EntityAIFollowPath(this));
    this.goalSelector.addGoal(32, new EntityAIMoveToHome(this));
    this.goalSelector.addGoal(11, this.spellHandler);
    this.spellHandler.addSpell(0, new EntityAIShootPoisonProjectiles(this, 80, 20) {

        @Override
        protected SoundEvent getStartChargingSound() {
            return SoundEvents.SPIDER_HURT;
        }

        @Override
        protected SoundEvent getStartCastingSound() {
            return SoundEvents.SPIDER_AMBIENT;
        }
    });
    this.goalSelector.addGoal(0, new EntityAICQRNearestAttackTarget(this));
    this.goalSelector.addGoal(1, new EntityAIHurtByTarget(this));
}
Also used : EntityAIFollowPath(team.cqr.cqrepoured.entity.ai.EntityAIFollowPath) EntityAIAttack(team.cqr.cqrepoured.entity.ai.attack.EntityAIAttack) BossAISpiderHook(team.cqr.cqrepoured.entity.ai.boss.giantspider.BossAISpiderHook) EntityAIMoveToHome(team.cqr.cqrepoured.entity.ai.EntityAIMoveToHome) EntityAIHurtByTarget(team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget) EntityAIMoveToLeader(team.cqr.cqrepoured.entity.ai.EntityAIMoveToLeader) BossAISpiderSummonMinions(team.cqr.cqrepoured.entity.ai.boss.giantspider.BossAISpiderSummonMinions) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) SoundEvent(net.minecraft.util.SoundEvent) BossAISpiderWebshot(team.cqr.cqrepoured.entity.ai.boss.giantspider.BossAISpiderWebshot) BossAISpiderLeapAttack(team.cqr.cqrepoured.entity.ai.boss.giantspider.BossAISpiderLeapAttack) EntityAIShootPoisonProjectiles(team.cqr.cqrepoured.entity.ai.spells.EntityAIShootPoisonProjectiles) EntityAICQRNearestAttackTarget(team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget) EntityAIFollowAttackTarget(team.cqr.cqrepoured.entity.ai.EntityAIFollowAttackTarget)

Example 5 with EntityAIHurtByTarget

use of team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget in project ChocolateQuestRepoured by TeamChocoQuest.

the class EntityCQRNetherDragon method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(5, new BossAIFlyToTarget(this));
    this.goalSelector.addGoal(8, new BossAIFlyToLocation(this));
    this.goalSelector.addGoal(10, new BossAISpiralUpToCirclingCenter(this));
    this.goalSelector.addGoal(12, new BossAICircleAroundLocation(this));
    this.targetSelector.addGoal(0, new EntityAINearestAttackTargetAtHomeArea<>(this));
    this.targetSelector.addGoal(2, new EntityAICQRNearestAttackTarget(this));
    this.targetSelector.addGoal(1, new EntityAIHurtByTarget(this));
}
Also used : BossAISpiralUpToCirclingCenter(team.cqr.cqrepoured.entity.ai.boss.netherdragon.BossAISpiralUpToCirclingCenter) EntityAICQRNearestAttackTarget(team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget) BossAICircleAroundLocation(team.cqr.cqrepoured.entity.ai.boss.netherdragon.BossAICircleAroundLocation) EntityAIHurtByTarget(team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget) BossAIFlyToTarget(team.cqr.cqrepoured.entity.ai.boss.netherdragon.BossAIFlyToTarget) BossAIFlyToLocation(team.cqr.cqrepoured.entity.ai.boss.netherdragon.BossAIFlyToLocation)

Aggregations

EntityAICQRNearestAttackTarget (team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget)6 EntityAIHurtByTarget (team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget)6 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)3 EntityAIFollowAttackTarget (team.cqr.cqrepoured.entity.ai.EntityAIFollowAttackTarget)3 EntityAIFollowPath (team.cqr.cqrepoured.entity.ai.EntityAIFollowPath)3 EntityAIIdleSit (team.cqr.cqrepoured.entity.ai.EntityAIIdleSit)3 EntityAIMoveToHome (team.cqr.cqrepoured.entity.ai.EntityAIMoveToHome)3 EntityAIMoveToLeader (team.cqr.cqrepoured.entity.ai.EntityAIMoveToLeader)3 EntityAIAttack (team.cqr.cqrepoured.entity.ai.attack.EntityAIAttack)3 EntityAIOpenCloseDoor (team.cqr.cqrepoured.entity.ai.EntityAIOpenCloseDoor)2 EntityAIBackstab (team.cqr.cqrepoured.entity.ai.attack.EntityAIBackstab)2 EntityAIAttackSpecial (team.cqr.cqrepoured.entity.ai.attack.special.EntityAIAttackSpecial)2 EntityAIHooker (team.cqr.cqrepoured.entity.ai.attack.special.EntityAIHooker)2 EntityAILooter (team.cqr.cqrepoured.entity.ai.attack.special.EntityAILooter)2 EntityAICursedBoneSummoner (team.cqr.cqrepoured.entity.ai.item.EntityAICursedBoneSummoner)2 EntityAIFireball (team.cqr.cqrepoured.entity.ai.item.EntityAIFireball)2 EntityAIPotionThrower (team.cqr.cqrepoured.entity.ai.item.EntityAIPotionThrower)2 SoundEvent (net.minecraft.util.SoundEvent)1 IHasTextureOverride (team.cqr.cqrepoured.customtextures.IHasTextureOverride)1 EntityAIFireFighter (team.cqr.cqrepoured.entity.ai.EntityAIFireFighter)1