Search in sources :

Example 1 with EntityAIAttackMelee

use of net.minecraft.entity.ai.EntityAIAttackMelee in project MorePlanets by SteveKunG.

the class EntityGiantWorm method initEntityAI.

@Override
protected void initEntityAI() {
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, false));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, true));
}
Also used : EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityAIHurtByTarget(net.minecraft.entity.ai.EntityAIHurtByTarget) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityAIAttackMelee(net.minecraft.entity.ai.EntityAIAttackMelee)

Aggregations

EntityAIAttackMelee (net.minecraft.entity.ai.EntityAIAttackMelee)1 EntityAIHurtByTarget (net.minecraft.entity.ai.EntityAIHurtByTarget)1 EntityAISwimming (net.minecraft.entity.ai.EntityAISwimming)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1