Search in sources :

Example 1 with HurtByTargetGoal

use of net.minecraft.entity.ai.goal.HurtByTargetGoal in project ChaosAwakens by ChaosAwakens.

the class RoboEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(4, new LookAtGoal(this, PlayerEntity.class, 32.0F));
    this.goalSelector.addGoal(4, new LookAtGoal(this, IronGolemEntity.class, 32.0F));
    this.goalSelector.addGoal(4, new LookAtGoal(this, SnowGolemEntity.class, 32.0F));
    this.goalSelector.addGoal(3, new LookAtGoal(this, AbstractVillagerEntity.class, 32.0F));
    this.goalSelector.addGoal(4, new LookAtGoal(this, AnimalEntity.class, 32.0F));
    this.targetSelector.addGoal(5, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
    this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
    this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, SnowGolemEntity.class, true));
    this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillagerEntity.class, true));
    this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, AnimalEntity.class, true));
}
Also used : AbstractVillagerEntity(net.minecraft.entity.merchant.villager.AbstractVillagerEntity) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) SnowGolemEntity(net.minecraft.entity.passive.SnowGolemEntity) AnimalEntity(net.minecraft.entity.passive.AnimalEntity) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with HurtByTargetGoal

use of net.minecraft.entity.ai.goal.HurtByTargetGoal in project bioplethora by AquexTheSeal.

the class CavernFleignarEntity method registerGoals.

@Override
protected void registerGoals() {
    super.registerGoals();
    this.goalSelector.addGoal(3, new LookAtGoal(this, PlayerEntity.class, 24.0F));
    this.goalSelector.addGoal(2, new CavernFleignarMeleeGoal(this, 20, 0.8, 0.9));
    this.goalSelector.addGoal(5, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(2, new CavernFleignarTargetGoal(this, true));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(this.getClass()));
}
Also used : CavernFleignarTargetGoal(io.github.bioplethora.entity.ai.CavernFleignarTargetGoal) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) CavernFleignarMeleeGoal(io.github.bioplethora.entity.ai.CavernFleignarMeleeGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)2 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 CavernFleignarMeleeGoal (io.github.bioplethora.entity.ai.CavernFleignarMeleeGoal)1 CavernFleignarTargetGoal (io.github.bioplethora.entity.ai.CavernFleignarTargetGoal)1 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)1 AbstractVillagerEntity (net.minecraft.entity.merchant.villager.AbstractVillagerEntity)1 AnimalEntity (net.minecraft.entity.passive.AnimalEntity)1 IronGolemEntity (net.minecraft.entity.passive.IronGolemEntity)1 SnowGolemEntity (net.minecraft.entity.passive.SnowGolemEntity)1