Search in sources :

Example 1 with PanicGoal

use of net.minecraft.entity.ai.goal.PanicGoal in project ChocolateQuestRepoured by TeamChocoQuest.

the class EntityCQRMountBase method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, new SwimGoal(this));
    this.goalSelector.addGoal(1, new PanicGoal(this, 0.9D));
    this.goalSelector.addGoal(6, new WaterAvoidingRandomWalkingGoal(this, 0.6D));
    this.goalSelector.addGoal(7, new LookAtGoal(this, PlayerEntity.class, 6.0F));
    this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PanicGoal(net.minecraft.entity.ai.goal.PanicGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with PanicGoal

use of net.minecraft.entity.ai.goal.PanicGoal 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));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) PanicGoal(net.minecraft.entity.ai.goal.PanicGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Example 3 with PanicGoal

use of net.minecraft.entity.ai.goal.PanicGoal in project ChaosAwakens by ChaosAwakens.

the class AbstractLavaEntity method registerGoals.

protected void registerGoals() {
    super.registerGoals();
    this.goalSelector.addGoal(0, new PanicGoal(this, 1.25D));
    this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, PlayerEntity.class, 8.0F, 1.6D, 1.4D, EntityPredicates.NO_SPECTATORS::test));
    this.goalSelector.addGoal(4, new AbstractLavaEntity.SwimGoal(this));
}
Also used : PanicGoal(net.minecraft.entity.ai.goal.PanicGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Example 4 with PanicGoal

use of net.minecraft.entity.ai.goal.PanicGoal 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));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) PanicGoal(net.minecraft.entity.ai.goal.PanicGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Aggregations

PanicGoal (net.minecraft.entity.ai.goal.PanicGoal)4 PlayerEntity (net.minecraft.entity.player.PlayerEntity)4 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)3 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)3 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)1 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)1 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)1