use of net.minecraft.entity.ai.goal.HurtByTargetGoal in project ChaosAwakens by ChaosAwakens.
the class RoboEntity method registerGoals.
@Override
protected void registerGoals() {
this.goalSelector.addGoal(4, new LookAtGoal(this, PlayerEntity.class, 32.0F));
this.goalSelector.addGoal(4, new LookAtGoal(this, IronGolemEntity.class, 32.0F));
this.goalSelector.addGoal(4, new LookAtGoal(this, SnowGolemEntity.class, 32.0F));
this.goalSelector.addGoal(3, new LookAtGoal(this, AbstractVillagerEntity.class, 32.0F));
this.goalSelector.addGoal(4, new LookAtGoal(this, AnimalEntity.class, 32.0F));
this.targetSelector.addGoal(5, new HurtByTargetGoal(this));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, SnowGolemEntity.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillagerEntity.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, AnimalEntity.class, true));
}
use of net.minecraft.entity.ai.goal.HurtByTargetGoal in project bioplethora by AquexTheSeal.
the class CavernFleignarEntity method registerGoals.
@Override
protected void registerGoals() {
super.registerGoals();
this.goalSelector.addGoal(3, new LookAtGoal(this, PlayerEntity.class, 24.0F));
this.goalSelector.addGoal(2, new CavernFleignarMeleeGoal(this, 20, 0.8, 0.9));
this.goalSelector.addGoal(5, new LookRandomlyGoal(this));
this.targetSelector.addGoal(2, new CavernFleignarTargetGoal(this, true));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(this.getClass()));
}
Aggregations