Search in sources :

Example 1 with LeapAtTargetGoal2

use of hmag.entity.goal.LeapAtTargetGoal2 in project Hostile-Mobs-and-Girls by Mechalopa.

the class HarpyEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(3, new LeapAtTargetGoal2(this, 0.375F, 0.45F, 7.0F, 24));
    this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, false));
    this.goalSelector.addGoal(5, new HarpyEntity.RandomWalkingGoal(this));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true).setUnseenMemoryTicks(120));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) LeapAtTargetGoal2(hmag.entity.goal.LeapAtTargetGoal2) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with LeapAtTargetGoal2

use of hmag.entity.goal.LeapAtTargetGoal2 in project Hostile-Mobs-and-Girls by Mechalopa.

the class SnowCanineEntity method registerGoals.

protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(3, new LeapAtTargetGoal2(this, 0.375F, 0.5F, 5.0F, 8));
    this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, false));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    if (ModConfigs.cachedServer.SNOW_CANINE_ATTACK_SHEEP)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, SheepEntity.class, 10, true, false, (p) -> {
            return p.distanceToSqr(this) <= 6.0D * 6.0D;
        }));
    if (ModConfigs.cachedServer.SNOW_CANINE_ATTACK_RABBITS)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, RabbitEntity.class, 10, true, false, (p) -> {
            return p.distanceToSqr(this) <= 6.0D * 6.0D;
        }));
    if (ModConfigs.cachedServer.SNOW_CANINE_ATTACK_BABY_TURTLES)
        this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, TurtleEntity.class, 10, true, false, TurtleEntity.BABY_ON_LAND_SELECTOR));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) LeapAtTargetGoal2(hmag.entity.goal.LeapAtTargetGoal2) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

LeapAtTargetGoal2 (hmag.entity.goal.LeapAtTargetGoal2)2 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)2 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)2 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)2 MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)2 NearestAttackableTargetGoal (net.minecraft.entity.ai.goal.NearestAttackableTargetGoal)2 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)1