Search in sources :

Example 6 with SwimGoal

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

the class EntityCQRPirateParrot method registerGoals.

@Override
protected void registerGoals() {
    // this.aiSit = new SitGoal(this);
    // this.tasks.addTask(0, new EntityAIPanic(this, 1.25D));
    this.goalSelector.addGoal(0, new SwimGoal(this));
    this.goalSelector.addGoal(1, new BossAIPirateParrotThrowPotions(this));
    // this.tasks.addTask(2, this.aiSit);
    this.goalSelector.addGoal(2, new FollowOwnerGoal(this, 1.0D, 5.0F, 1.0F, true));
    this.goalSelector.addGoal(4, new WaterAvoidingRandomFlyingGoal(this, 1.0D));
    this.goalSelector.addGoal(5, new BossAIPirateParrotLandOnCaptainsShoulder(this));
    this.goalSelector.addGoal(3, new FollowMobGoal(this, 1.0D, 3.0F, 7.0F));
    this.targetSelector.addGoal(0, new EntityAIPetNearestAttackTarget<>(this, MobEntity.class, 100, true, false));
}
Also used : BossAIPirateParrotThrowPotions(team.cqr.cqrepoured.entity.ai.boss.piratecaptain.parrot.BossAIPirateParrotThrowPotions) FollowMobGoal(net.minecraft.entity.ai.goal.FollowMobGoal) WaterAvoidingRandomFlyingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomFlyingGoal) FollowOwnerGoal(net.minecraft.entity.ai.goal.FollowOwnerGoal) BossAIPirateParrotLandOnCaptainsShoulder(team.cqr.cqrepoured.entity.ai.boss.piratecaptain.parrot.BossAIPirateParrotLandOnCaptainsShoulder) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) MobEntity(net.minecraft.entity.MobEntity)

Example 7 with SwimGoal

use of net.minecraft.entity.ai.goal.SwimGoal 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 8 with SwimGoal

use of net.minecraft.entity.ai.goal.SwimGoal in project minecolonies by ldtteam.

the class EntityCitizen method initTasks.

/**
 * Initiates citizen goalSelector Suppressing Sonar Rule Squid:S881 The rule thinks we should extract ++priority in a proper statement. But in this case the rule does not apply
 * because that would remove the readability.
 */
@SuppressWarnings(INCREMENT_AND_DECREMENT_OPERATORS_SHOULD_NOT_BE_USED_IN_A_METHOD_CALL_OR_MIXED_WITH_OTHER_OPERATORS_IN_AN_EXPRESSION)
private void initTasks() {
    int priority = 0;
    this.goalSelector.addGoal(priority, new SwimGoal(this));
    this.goalSelector.addGoal(++priority, new EntityAICitizenAvoidEntity(this, MonsterEntity.class, (float) DISTANCE_OF_ENTITY_AVOID, LATER_RUN_SPEED_AVOID, INITIAL_RUN_SPEED_AVOID));
    this.goalSelector.addGoal(++priority, new EntityAIEatTask(this));
    this.goalSelector.addGoal(++priority, new EntityAISickTask(this));
    this.goalSelector.addGoal(++priority, new EntityAISleep(this));
    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 EntityAICitizenWander(this, DEFAULT_SPEED, 1.0D));
    this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
    this.goalSelector.addGoal(++priority, new EntityAIMournCitizen(this, DEFAULT_SPEED));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) EntityAIInteractToggleAble(com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble) MonsterEntity(net.minecraft.entity.monster.MonsterEntity) LookAtWithoutMovingGoal(net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen)

Example 9 with SwimGoal

use of net.minecraft.entity.ai.goal.SwimGoal 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));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) EntityAIInteractToggleAble(com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble) EntityAIVisitor(com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor) LookAtWithoutMovingGoal(net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal) OpenDoorGoal(net.minecraft.entity.ai.goal.OpenDoorGoal) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Example 10 with SwimGoal

use of net.minecraft.entity.ai.goal.SwimGoal in project friends-and-foes by Faboslav.

the class GlareEntity method initGoals.

protected void initGoals() {
    this.goalSelector.add(1, new GlareSitGoal(this));
    this.goalSelector.add(2, new GlareFollowOwnerGoal(this, 8.0F, 2.0F, false));
    this.goalSelector.add(3, new GlareAvoidMonsterGoal(this, HostileEntity.class, 16.0F));
    this.eatGlowBerriesGoal = new GlareEatGlowBerriesGoal(this);
    this.goalSelector.add(4, this.eatGlowBerriesGoal);
    this.goalSelector.add(4, new GlareShakeOffGlowBerriesGoal(this));
    this.flyToDarkSpotGoal = new GlareFlyToDarkSpotGoal(this);
    this.goalSelector.add(5, this.flyToDarkSpotGoal);
    this.goalSelector.add(6, new GlareWanderAroundGoal(this));
    this.goalSelector.add(7, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.add(8, new SwimGoal(this));
}
Also used : HostileEntity(net.minecraft.entity.mob.HostileEntity) LookAtEntityGoal(net.minecraft.entity.ai.goal.LookAtEntityGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity)

Aggregations

SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)23 PlayerEntity (net.minecraft.entity.player.PlayerEntity)12 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)7 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)6 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)5 AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)4 EntityAIInteractToggleAble (com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble)4 LookAtEntityGoal (net.minecraft.entity.ai.goal.LookAtEntityGoal)4 LookAtWithoutMovingGoal (net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal)4 RandomWalkingGoal (net.minecraft.entity.ai.goal.RandomWalkingGoal)3 RevengeGoal (net.minecraft.entity.ai.goal.RevengeGoal)3 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)3 EntityAIFollowAttackTarget (team.cqr.cqrepoured.entity.ai.EntityAIFollowAttackTarget)3 EntityAIFollowPath (team.cqr.cqrepoured.entity.ai.EntityAIFollowPath)3 EntityAIMoveToHome (team.cqr.cqrepoured.entity.ai.EntityAIMoveToHome)3 EntityAIMoveToLeader (team.cqr.cqrepoured.entity.ai.EntityAIMoveToLeader)3 EntityAIAttack (team.cqr.cqrepoured.entity.ai.attack.EntityAIAttack)3 EntityAICQRNearestAttackTarget (team.cqr.cqrepoured.entity.ai.target.EntityAICQRNearestAttackTarget)3 EntityAIHurtByTarget (team.cqr.cqrepoured.entity.ai.target.EntityAIHurtByTarget)3 EntityAIVisitor (com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor)2