Search in sources :

Example 1 with EntityAILeapAtTarget

use of net.minecraft.entity.ai.EntityAILeapAtTarget in project DefiledLands by Lykrast.

the class EntityBookWyrm method initEntityAI.

protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new AIPanic(1.2D));
    this.tasks.addTask(2, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(3, new EntityAIAttackMelee(this, 1.2D, false));
    this.tasks.addTask(4, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(5, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(6, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(7, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(9, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new AIHurtByTarget());
}
Also used : EntityAIWatchClosest(net.minecraft.entity.ai.EntityAIWatchClosest) EntityAILeapAtTarget(net.minecraft.entity.ai.EntityAILeapAtTarget) EntityAIFollowParent(net.minecraft.entity.ai.EntityAIFollowParent) EntityAIPanic(net.minecraft.entity.ai.EntityAIPanic) EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityAITempt(net.minecraft.entity.ai.EntityAITempt) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityAIMate(net.minecraft.entity.ai.EntityAIMate) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityAIHurtByTarget(net.minecraft.entity.ai.EntityAIHurtByTarget) EntityAIAttackMelee(net.minecraft.entity.ai.EntityAIAttackMelee) EntityAIWanderAvoidWater(net.minecraft.entity.ai.EntityAIWanderAvoidWater)

Example 2 with EntityAILeapAtTarget

use of net.minecraft.entity.ai.EntityAILeapAtTarget in project Tropicraft by Tropicraft.

the class EntityEIH method initEntityAI.

@Override
protected void initEntityAI() {
    super.initEntityAI();
    this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, false) {

        @Override
        public boolean shouldExecute() {
            if (getState() != STATE_ANGRY)
                return false;
            return super.shouldExecute();
        }
    });
    EntityAILeapAtTarget leap = new EntityAILeapAtTarget(this, 0.4F);
    leap.setMutexBits(0);
    this.tasks.addTask(3, leap);
    this.tasks.addTask(5, new EntityAIWander(this, 0.8D) {

        @Override
        public boolean shouldExecute() {
            if (getState() != STATE_ANGRY)
                return false;
            return super.shouldExecute();
        }
    });
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
}
Also used : EntityAILeapAtTarget(net.minecraft.entity.ai.EntityAILeapAtTarget) EntityAIHurtByTarget(net.minecraft.entity.ai.EntityAIHurtByTarget) EntityAIWander(net.minecraft.entity.ai.EntityAIWander) EntityAIAttackMelee(net.minecraft.entity.ai.EntityAIAttackMelee)

Example 3 with EntityAILeapAtTarget

use of net.minecraft.entity.ai.EntityAILeapAtTarget in project DefiledLands by Lykrast.

the class EntityScuttler method initEntityAI.

@Override
protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.5F));
    this.tasks.addTask(4, new EntityScuttler.AISpiderAttack(this));
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 0.8D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, false));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityIronGolem>(this, EntityIronGolem.class, false));
}
Also used : EntityAIWatchClosest(net.minecraft.entity.ai.EntityAIWatchClosest) EntityAILeapAtTarget(net.minecraft.entity.ai.EntityAILeapAtTarget) EntityAIHurtByTarget(net.minecraft.entity.ai.EntityAIHurtByTarget) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityIronGolem(net.minecraft.entity.monster.EntityIronGolem) EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityAIWanderAvoidWater(net.minecraft.entity.ai.EntityAIWanderAvoidWater)

Aggregations

EntityAIHurtByTarget (net.minecraft.entity.ai.EntityAIHurtByTarget)3 EntityAILeapAtTarget (net.minecraft.entity.ai.EntityAILeapAtTarget)3 EntityAIAttackMelee (net.minecraft.entity.ai.EntityAIAttackMelee)2 EntityAILookIdle (net.minecraft.entity.ai.EntityAILookIdle)2 EntityAISwimming (net.minecraft.entity.ai.EntityAISwimming)2 EntityAIWanderAvoidWater (net.minecraft.entity.ai.EntityAIWanderAvoidWater)2 EntityAIWatchClosest (net.minecraft.entity.ai.EntityAIWatchClosest)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 EntityAIFollowParent (net.minecraft.entity.ai.EntityAIFollowParent)1 EntityAIMate (net.minecraft.entity.ai.EntityAIMate)1 EntityAIPanic (net.minecraft.entity.ai.EntityAIPanic)1 EntityAITempt (net.minecraft.entity.ai.EntityAITempt)1 EntityAIWander (net.minecraft.entity.ai.EntityAIWander)1 EntityIronGolem (net.minecraft.entity.monster.EntityIronGolem)1