Search in sources :

Example 1 with RangedStaticAttackGoal

use of mod.azure.doom.entity.ai.goal.RangedStaticAttackGoal in project MCDoom by AzureDoom.

the class CacodemonEntity method initGoals.

@Override
protected void initGoals() {
    this.goalSelector.add(8, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.add(4, new RangedStaticAttackGoal(this, new FireballAttack(this, true).setDamage(10).setProjectileOriginOffset(1.5, 0.3, 1.5).setSound(ModSoundEvents.CACODEMON_AFFECTIONATE_SCREAM, 1.0F, 1.2F / (this.getRandom().nextFloat() * 0.2F + 0.9F)), 60, 20, 30F, 1));
    this.goalSelector.add(5, new RandomFlyConvergeOnTargetGoal(this, 2, 15, 0.5));
    this.targetSelector.add(2, new ActiveTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.add(2, new ActiveTargetGoal<>(this, MerchantEntity.class, true));
    this.targetSelector.add(2, new RevengeGoal(this).setGroupRevenge());
}
Also used : RandomFlyConvergeOnTargetGoal(mod.azure.doom.entity.ai.goal.RandomFlyConvergeOnTargetGoal) RevengeGoal(net.minecraft.entity.ai.goal.RevengeGoal) FireballAttack(mod.azure.doom.entity.attack.FireballAttack) MerchantEntity(net.minecraft.entity.passive.MerchantEntity) LookAtEntityGoal(net.minecraft.entity.ai.goal.LookAtEntityGoal) RangedStaticAttackGoal(mod.azure.doom.entity.ai.goal.RangedStaticAttackGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

RandomFlyConvergeOnTargetGoal (mod.azure.doom.entity.ai.goal.RandomFlyConvergeOnTargetGoal)1 RangedStaticAttackGoal (mod.azure.doom.entity.ai.goal.RangedStaticAttackGoal)1 FireballAttack (mod.azure.doom.entity.attack.FireballAttack)1 LookAtEntityGoal (net.minecraft.entity.ai.goal.LookAtEntityGoal)1 RevengeGoal (net.minecraft.entity.ai.goal.RevengeGoal)1 MerchantEntity (net.minecraft.entity.passive.MerchantEntity)1 PlayerEntity (net.minecraft.entity.player.PlayerEntity)1