Search in sources :

Example 1 with ShadowGoal

use of online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal 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 2 with ShadowGoal

use of online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal 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 3 with ShadowGoal

use of online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal in project Kingdom-Keys by Wehavecookies56.

the class GigaShadowEntity 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)

Aggregations

LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)3 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)3 MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)3 MoveTowardsRestrictionGoal (net.minecraft.entity.ai.goal.MoveTowardsRestrictionGoal)3 WaterAvoidingRandomWalkingGoal (net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal)3 VillagerEntity (net.minecraft.entity.merchant.villager.VillagerEntity)3 PlayerEntity (net.minecraft.entity.player.PlayerEntity)3 ShadowGoal (online.kingdomkeys.kingdomkeys.entity.mob.goal.ShadowGoal)3