Search in sources :

Example 1 with MoveTowardsRestrictionGoal

use of net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal in project VariousOddities by Lyinginbedmon.

the class AbstractScorpion method registerGoals.

protected void registerGoals() {
    this.goalSelector.addGoal(0, new SwimGoal(this));
    this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(7, new LookAtGoal(this, PlayerEntity.class, 6.0F));
    this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) MoveTowardsRestrictionGoal(net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with MoveTowardsRestrictionGoal

use of net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal in project Kingdom-Keys by Wehavecookies56.

the class AssassinEntity method registerGoals.

@Override
protected void registerGoals() {
    // this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    this.goalSelector.addGoal(7, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(8, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, VillagerEntity.class, true));
    // this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AnimalEntity.class, true));
    this.targetSelector.addGoal(4, new AssassinGoal(this));
}
Also used : VillagerEntity(net.minecraft.entity.merchant.villager.VillagerEntity) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) MoveTowardsRestrictionGoal(net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) AssassinGoal(online.kingdomkeys.kingdomkeys.entity.mob.goal.AssassinGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 3 with MoveTowardsRestrictionGoal

use of net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal in project Kingdom-Keys by Wehavecookies56.

the class MegaShadowEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    this.goalSelector.addGoal(7, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(8, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, VillagerEntity.class, true));
    // this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AnimalEntity.class, true));
    this.targetSelector.addGoal(4, new ShadowGoal(this));
}
Also used : VillagerEntity(net.minecraft.entity.merchant.villager.VillagerEntity) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) MoveTowardsRestrictionGoal(net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) ShadowGoal(online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 4 with MoveTowardsRestrictionGoal

use of net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal in project Kingdom-Keys by Wehavecookies56.

the class ShadowEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    this.goalSelector.addGoal(7, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(8, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, VillagerEntity.class, true));
    this.targetSelector.addGoal(4, new ShadowGoal(this));
}
Also used : VillagerEntity(net.minecraft.entity.merchant.villager.VillagerEntity) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) MoveTowardsRestrictionGoal(net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) ShadowGoal(online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 5 with MoveTowardsRestrictionGoal

use of net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal in project Kingdom-Keys by Wehavecookies56.

the class BaseElementalMusicalHeartlessEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, goalToUse());
    this.goalSelector.addGoal(1, new MoveTowardsRestrictionGoal(this, 1.0D));
    this.goalSelector.addGoal(2, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(3, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(4, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, VillagerEntity.class, true));
}
Also used : VillagerEntity(net.minecraft.entity.merchant.villager.VillagerEntity) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) MoveTowardsRestrictionGoal(net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)11 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)11 MoveTowardsRestrictionGoal (net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal)11 PlayerEntity (net.minecraft.entity.player.PlayerEntity)11 MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)10 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)7 VillagerEntity (net.minecraft.entity.merchant.villager.VillagerEntity)6 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)4 ShadowGoal (online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal)3 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)2 RandomWalkingGoal (net.minecraft.entity.ai.goal.RandomWalkingGoal)1 AssassinGoal (online.kingdomkeys.kingdomkeys.entity.mob.goal.AssassinGoal)1 MarluxiaGoal (online.kingdomkeys.kingdomkeys.entity.mob.goal.MarluxiaGoal)1