use of net.minecraft.entity.ai.goal.LookAtGoal in project minecolonies by ldtteam.
the class VisitorCitizen method initTasks.
private void initTasks() {
int priority = 0;
this.goalSelector.addGoal(priority, new SwimGoal(this));
this.goalSelector.addGoal(++priority, new OpenDoorGoal(this, true));
this.goalSelector.addGoal(priority, new EntityAIInteractToggleAble(this, FENCE_TOGGLE, TRAP_TOGGLE, DOOR_TOGGLE));
this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, PlayerEntity.class, WATCH_CLOSEST2, 1.0F));
this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, EntityCitizen.class, WATCH_CLOSEST2_FAR, WATCH_CLOSEST2_FAR_CHANCE));
this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
this.goalSelector.addGoal(++priority, new EntityAIVisitor(this));
}
use of net.minecraft.entity.ai.goal.LookAtGoal in project ChaosAwakens by ChaosAwakens.
the class SparkFishEntity method registerGoals.
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new PanicGoal(this, 1.05D));
this.goalSelector.addGoal(0, new LookAtGoal(this, PlayerEntity.class, 3.0F, 3.0F));
this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, PlayerEntity.class, 4.0F, 0.8D, 0.7D, EntityPredicates.NO_SPECTATORS::test));
this.goalSelector.addGoal(4, new SparkFishEntity.SwimGoal(this));
}
use of net.minecraft.entity.ai.goal.LookAtGoal 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.LookAtGoal in project minecolonies by Minecolonies.
the class VisitorCitizen method initTasks.
private void initTasks() {
int priority = 0;
this.goalSelector.addGoal(priority, new SwimGoal(this));
this.goalSelector.addGoal(++priority, new OpenDoorGoal(this, true));
this.goalSelector.addGoal(priority, new EntityAIInteractToggleAble(this, FENCE_TOGGLE, TRAP_TOGGLE, DOOR_TOGGLE));
this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, PlayerEntity.class, WATCH_CLOSEST2, 1.0F));
this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, EntityCitizen.class, WATCH_CLOSEST2_FAR, WATCH_CLOSEST2_FAR_CHANCE));
this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
this.goalSelector.addGoal(++priority, new EntityAIVisitor(this));
}
use of net.minecraft.entity.ai.goal.LookAtGoal 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