use of net.minecraft.entity.ai.goal.LookAtGoal in project ChaosAwakens by ChaosAwakens.
the class GreenFishEntity 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 GreenFishEntity.SwimGoal(this));
}
use of net.minecraft.entity.ai.goal.LookAtGoal in project ChaosAwakens by ChaosAwakens.
the class LavaEelEntity method registerGoals.
@Override
protected void registerGoals() {
super.registerGoals();
this.goalSelector.addGoal(0, new LookAtGoal(this, PlayerEntity.class, 3.0F, 3.0F));
if (this.level.getDifficulty() != Difficulty.PEACEFUL) {
this.targetSelector.addGoal(3, new LavaEelEntity.AttackGoal(this, 2.0F, false));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
}
// this.goalSelector.addGoal(4, new WaterAvoidingRandomWalkingGoal(this, 8.0D));
this.goalSelector.addGoal(4, new LavaEelEntity.SwimGoal(this));
}
use of net.minecraft.entity.ai.goal.LookAtGoal in project ChaosAwakens by ChaosAwakens.
the class BeaverEntity method registerGoals.
@Override
protected void registerGoals() {
this.goalSelector.addGoal(1, new SwimGoal(this));
this.goalSelector.addGoal(5, new RandomWalkingGoal(this, 1.6));
this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 6.0F));
this.goalSelector.addGoal(7, new LookRandomlyGoal(this));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.OAK_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.BIRCH_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.SPRUCE_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.JUNGLE_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.DARK_OAK_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.ACACIA_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_OAK_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_BIRCH_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_SPRUCE_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_JUNGLE_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_DARK_OAK_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_ACACIA_LOG, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.OAK_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.BIRCH_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.SPRUCE_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.JUNGLE_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.DARK_OAK_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.ACACIA_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_OAK_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_BIRCH_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_SPRUCE_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_JUNGLE_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_DARK_OAK_WOOD, this, 1.0D, 16));
// this.goalSelector.addGoal(7, new BreakBlockGoal(Blocks.STRIPPED_ACACIA_WOOD, this, 1.0D, 16));
}
Aggregations