Search in sources :

Example 1 with MeleeAttackGoal

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

the class DoguEntity 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, 4.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 : 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) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with MeleeAttackGoal

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

the class DullahanEntity 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));
}
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) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 3 with MeleeAttackGoal

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

the class CursedDollEntity 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));
}
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) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 4 with MeleeAttackGoal

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

use of net.minecraft.entity.ai.goal.MeleeAttackGoal 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)

Aggregations

MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)35 PlayerEntity (net.minecraft.entity.player.PlayerEntity)31 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)25 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)22 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)20 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)17 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)16 MoveTowardsRestrictionGoal (net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal)10 VillagerEntity (net.minecraft.entity.merchant.villager.VillagerEntity)8 NearestAttackableTargetGoal (net.minecraft.entity.ai.goal.NearestAttackableTargetGoal)6 IronGolemEntity (net.minecraft.entity.passive.IronGolemEntity)4 LookAtEntityGoal (net.minecraft.entity.ai.goal.LookAtEntityGoal)3 RandomWalkingGoal (net.minecraft.entity.ai.goal.RandomWalkingGoal)3 LeapAtTargetGoal2 (hmag.entity.goal.LeapAtTargetGoal2)2 MobEntity (net.minecraft.entity.MobEntity)2 FollowTargetGoal (net.minecraft.entity.ai.goal.FollowTargetGoal)2 ShadowGoal (online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal)2 EntityAIWargWander (com.lying.variousoddities.entity.ai.EntityAIWargWander)1 EntityAIRatGnawing (com.lying.variousoddities.entity.ai.hostile.EntityAIRatGnawing)1 EntityAIRatStand (com.lying.variousoddities.entity.ai.hostile.EntityAIRatStand)1