Search in sources :

Example 11 with LookAtGoal

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));
}
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 12 with LookAtGoal

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

Example 13 with LookAtGoal

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));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) RandomWalkingGoal(net.minecraft.entity.ai.goal.RandomWalkingGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)13 PlayerEntity (net.minecraft.entity.player.PlayerEntity)13 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)7 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)7 AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)4 EntityAIInteractToggleAble (com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble)4 LookAtWithoutMovingGoal (net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal)4 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)4 PanicGoal (net.minecraft.entity.ai.goal.PanicGoal)3 EntityAIVisitor (com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor)2 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)2 OpenDoorGoal (net.minecraft.entity.ai.goal.OpenDoorGoal)2 MonsterEntity (net.minecraft.entity.monster.MonsterEntity)2 CavernFleignarMeleeGoal (io.github.bioplethora.entity.ai.CavernFleignarMeleeGoal)1 CavernFleignarTargetGoal (io.github.bioplethora.entity.ai.CavernFleignarTargetGoal)1 RobitAIFollow (mekanism.common.entity.ai.RobitAIFollow)1 RobitAIPickup (mekanism.common.entity.ai.RobitAIPickup)1 RandomWalkingGoal (net.minecraft.entity.ai.goal.RandomWalkingGoal)1 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)1 AbstractVillagerEntity (net.minecraft.entity.merchant.villager.AbstractVillagerEntity)1