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));
}
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));
}
Aggregations