Search in sources :

Example 1 with EntityAIMeleeAndRangedAttack

use of net.tropicraft.core.common.entity.ai.ashen.EntityAIMeleeAndRangedAttack in project Tropicraft by Tropicraft.

the class AshenEntity method registerGoals.

@Override
protected void registerGoals() {
    goalSelector.addGoal(1, new FloatGoal(this));
    goalSelector.addGoal(2, new AIAshenChaseAndPickupLostMask(this, 1.0D));
    goalSelector.addGoal(3, new AIAshenShootDart(this));
    goalSelector.addGoal(4, new RandomStrollGoal(this, 1.0D));
    goalSelector.addGoal(5, new EntityAIMeleeAndRangedAttack(this, 1.0D, 20 * 2, 20 * 10, 5F));
    goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(7, new RandomLookAroundGoal(this));
    targetSelector.addGoal(1, new HurtByTargetGoal(this));
    // TODO: Change predicate in last parameter below?
    targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
    targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, EntityKoaBase.class, true));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) EntityKoaBase(net.tropicraft.core.common.entity.passive.EntityKoaBase) AIAshenShootDart(net.tropicraft.core.common.entity.ai.ashen.AIAshenShootDart) Player(net.minecraft.world.entity.player.Player) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) HurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal) EntityAIMeleeAndRangedAttack(net.tropicraft.core.common.entity.ai.ashen.EntityAIMeleeAndRangedAttack) AIAshenChaseAndPickupLostMask(net.tropicraft.core.common.entity.ai.ashen.AIAshenChaseAndPickupLostMask) RandomStrollGoal(net.minecraft.world.entity.ai.goal.RandomStrollGoal)

Aggregations

FloatGoal (net.minecraft.world.entity.ai.goal.FloatGoal)1 LookAtPlayerGoal (net.minecraft.world.entity.ai.goal.LookAtPlayerGoal)1 RandomLookAroundGoal (net.minecraft.world.entity.ai.goal.RandomLookAroundGoal)1 RandomStrollGoal (net.minecraft.world.entity.ai.goal.RandomStrollGoal)1 HurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal)1 Player (net.minecraft.world.entity.player.Player)1 AIAshenChaseAndPickupLostMask (net.tropicraft.core.common.entity.ai.ashen.AIAshenChaseAndPickupLostMask)1 AIAshenShootDart (net.tropicraft.core.common.entity.ai.ashen.AIAshenShootDart)1 EntityAIMeleeAndRangedAttack (net.tropicraft.core.common.entity.ai.ashen.EntityAIMeleeAndRangedAttack)1 EntityKoaBase (net.tropicraft.core.common.entity.passive.EntityKoaBase)1