Search in sources :

Example 6 with WaterAvoidingRandomWalkingGoal

use of net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal in project Hostile-Mobs-and-Girls by Mechalopa.

the class JackFrostEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(4, new RangedAttackGoal2(this, 1.25D, 20, 30, 15.0F, true));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 3.0F, 1.0F));
    this.goalSelector.addGoal(7, new LookAtGoal(this, MobEntity.class, 8.0F));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
}
Also used : RangedAttackGoal2(hmag.entity.goal.RangedAttackGoal2) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) MobEntity(net.minecraft.entity.MobEntity) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 7 with WaterAvoidingRandomWalkingGoal

use of net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal in project Hostile-Mobs-and-Girls by Mechalopa.

the class NecroticReaperEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, false));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true).setUnseenMemoryTicks(120));
    if (ModConfigs.cachedServer.NECROTIC_REAPER_ATTACK_VILLAGERS)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillagerEntity.class, false));
    this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
    if (ModConfigs.cachedServer.NECROTIC_REAPER_ATTACK_BABY_TURTLES)
        this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, TurtleEntity.class, 10, true, false, TurtleEntity.BABY_ON_LAND_SELECTOR));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 8 with WaterAvoidingRandomWalkingGoal

use of net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal in project Hostile-Mobs-and-Girls by Mechalopa.

the class ScorpionEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(4, new MeleeAttackGoal2(this, 1.0D, false, 1.5F));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
}
Also used : MeleeAttackGoal2(hmag.entity.goal.MeleeAttackGoal2) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 9 with WaterAvoidingRandomWalkingGoal

use of net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal in project Hostile-Mobs-and-Girls by Mechalopa.

the class SlimeGirlEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(3, new SlimeGirlEntity.LeapGoal(this));
    this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, false));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 10 with WaterAvoidingRandomWalkingGoal

use of net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal in project Hostile-Mobs-and-Girls by Mechalopa.

the class KashaEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(3, new LeapAtTargetGoal(this, 0.3F));
    this.goalSelector.addGoal(4, new OcelotAttackGoal(this));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomWalkingGoal(this, 0.8D, 0.0F));
    this.goalSelector.addGoal(6, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(6, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    if (ModConfigs.cachedServer.KASHA_ATTACK_CHICKENS)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, ChickenEntity.class, false));
    if (ModConfigs.cachedServer.KASHA_ATTACK_BABY_HOGLINS)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, HoglinEntity.class, 10, false, false, (p) -> {
            return p.isBaby();
        }));
    if (ModConfigs.cachedServer.KASHA_ATTACK_VILLAGERS)
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillagerEntity.class, false));
    this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
    if (ModConfigs.cachedServer.KASHA_ATTACK_BABY_TURTLES)
        this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, TurtleEntity.class, 10, false, false, TurtleEntity.BABY_ON_LAND_SELECTOR));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) OcelotAttackGoal(net.minecraft.entity.ai.goal.OcelotAttackGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) LeapAtTargetGoal(net.minecraft.entity.ai.goal.LeapAtTargetGoal) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)39 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)36 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)33 PlayerEntity (net.minecraft.entity.player.PlayerEntity)33 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)24 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)21 MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)16 NearestAttackableTargetGoal (net.minecraft.entity.ai.goal.NearestAttackableTargetGoal)11 IronGolemEntity (net.minecraft.entity.passive.IronGolemEntity)11 MoveTowardsRestrictionGoal (net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal)7 VillagerEntity (net.minecraft.entity.merchant.villager.VillagerEntity)7 MeleeAttackGoal2 (hmag.entity.goal.MeleeAttackGoal2)4 PanicGoal (net.minecraft.entity.ai.goal.PanicGoal)4 RandomWalkingGoal (net.minecraft.entity.ai.goal.RandomWalkingGoal)3 RangedAttackGoal2 (hmag.entity.goal.RangedAttackGoal2)2 RoboAttackGoal (io.github.chaosawakens.common.entity.ai.RoboAttackGoal)2 MobEntity (net.minecraft.entity.MobEntity)2 BreedGoal (net.minecraft.entity.ai.goal.BreedGoal)2 EatGrassGoal (net.minecraft.entity.ai.goal.EatGrassGoal)2 FollowParentGoal (net.minecraft.entity.ai.goal.FollowParentGoal)2