Search in sources :

Example 6 with EntityAILookIdle

use of net.minecraft.entity.ai.EntityAILookIdle in project Cavern2 by kegare.

the class EntityCaveman method initEntityAI.

@Override
protected void initEntityAI() {
    tasks.addTask(0, new EntityAISwimming(this));
    tasks.addTask(1, new EntityAIRestrictSun(this));
    tasks.addTask(2, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(8, new EntityAILookIdle(this));
    applyEntityAI();
}
Also used : EntityAIWatchClosest(net.minecraft.entity.ai.EntityAIWatchClosest) EntityAIMoveTowardsRestriction(net.minecraft.entity.ai.EntityAIMoveTowardsRestriction) EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityAIRestrictSun(net.minecraft.entity.ai.EntityAIRestrictSun) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityAIWanderAvoidWater(net.minecraft.entity.ai.EntityAIWanderAvoidWater)

Example 7 with EntityAILookIdle

use of net.minecraft.entity.ai.EntityAILookIdle in project Cavern2 by kegare.

the class EntityCavenicBear method initEntityAI.

@Override
protected void initEntityAI() {
    tasks.addTask(0, new EntityAISwimming(this));
    tasks.addTask(1, new AIMeleeAttack());
    tasks.addTask(1, new AIPanic());
    tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    tasks.addTask(5, new EntityAIWander(this, 1.0D));
    tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    tasks.addTask(7, new EntityAILookIdle(this));
    targetTasks.addTask(1, new AIHurtByTarget());
    targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, 20, true, true, null));
}
Also used : EntityAIWatchClosest(net.minecraft.entity.ai.EntityAIWatchClosest) EntityAIFollowParent(net.minecraft.entity.ai.EntityAIFollowParent) EntityAIPanic(net.minecraft.entity.ai.EntityAIPanic) EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityAIWander(net.minecraft.entity.ai.EntityAIWander) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityAIHurtByTarget(net.minecraft.entity.ai.EntityAIHurtByTarget)

Example 8 with EntityAILookIdle

use of net.minecraft.entity.ai.EntityAILookIdle in project ClaySoldiersMod by SanAndreasP.

the class EntityClaySoldier method initEntityAI.

@Override
protected void initEntityAI() {
    this.tasks.addTask(1, new EntityAIFollowTarget.Fallen(this, 1.0D));
    this.tasks.addTask(2, new EntityAIFollowTarget.Upgrade(this, 1.0D));
    this.tasks.addTask(2, new EntityAIFollowTarget.Mount(this, 1.0D));
    this.tasks.addTask(2, new EntityAIFollowInventory(this, 1.0D));
    this.tasks.addTask(3, new EntityAIFollowTarget.King(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowEnemy.Ranged(this, 1.0D));
    this.tasks.addTask(5, new EntityAIFollowEnemy.Meelee(this, 1.0D));
    this.tasks.addTask(6, new EntityAIMoveTowardsRestriction(this, 0.5D));
    this.tasks.addTask(7, new EntityAIWander(this, 0.5D));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAISearchTarget.Fallen(this));
    this.targetTasks.addTask(2, new EntityAISearchTarget.Upgrade(this));
    this.targetTasks.addTask(2, new EntityAISearchInventory(this));
    this.targetTasks.addTask(2, new EntityAISearchTarget.Mount(this));
    this.targetTasks.addTask(3, new EntityAISearchTarget.King(this));
    this.targetTasks.addTask(4, new EntityAISearchTarget.Enemy(this));
}
Also used : EntityAIWander(net.minecraft.entity.ai.EntityAIWander) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityAIMoveTowardsRestriction(net.minecraft.entity.ai.EntityAIMoveTowardsRestriction) EntityAISearchTarget(de.sanandrew.mods.claysoldiers.entity.ai.EntityAISearchTarget) EntityAIFollowEnemy(de.sanandrew.mods.claysoldiers.entity.ai.EntityAIFollowEnemy) EntityAIFollowTarget(de.sanandrew.mods.claysoldiers.entity.ai.EntityAIFollowTarget) EntityAIFollowInventory(de.sanandrew.mods.claysoldiers.entity.ai.EntityAIFollowInventory) EntityAISearchInventory(de.sanandrew.mods.claysoldiers.entity.ai.EntityAISearchInventory)

Example 9 with EntityAILookIdle

use of net.minecraft.entity.ai.EntityAILookIdle in project KalStuff by TEAMModding.

the class EntityDuck method initEntityAI.

protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.0D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(7, new EntityAILookIdle(this));
}
Also used : EntityAIFollowParent(net.minecraft.entity.ai.EntityAIFollowParent) EntityAISwimming(net.minecraft.entity.ai.EntityAISwimming) EntityAITempt(net.minecraft.entity.ai.EntityAITempt) EntityAILookIdle(net.minecraft.entity.ai.EntityAILookIdle) EntityAIPanic(net.minecraft.entity.ai.EntityAIPanic)

Example 10 with EntityAILookIdle

use of net.minecraft.entity.ai.EntityAILookIdle in project Almura by AlmuraDev.

the class MixinEntityChicken method initEntityAI.

/**
 * @author Dockter
 * Purpose: overwrite the AT init method to customize the temptations list.
 */
@Overwrite
protected void initEntityAI() {
    final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS);
    Item soyBeanItem = GameRegistry.makeItemStack("almura:food/food/soybean", 0, 1, null).getItem();
    Item cornItem = GameRegistry.makeItemStack("almura:food/food/corn", 0, 1, null).getItem();
    if (soyBeanItem != ItemStack.EMPTY.getItem())
        TEMPTATION_ITEMS.add(soyBeanItem);
    if (cornItem != ItemStack.EMPTY.getItem())
        TEMPTATION_ITEMS.add(cornItem);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.0D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
}
Also used : Item(net.minecraft.item.Item) EntityAIWatchClosest(net.minecraft.entity.ai.EntityAIWatchClosest) EntityAIFollowParent(net.minecraft.entity.ai.EntityAIFollowParent) 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) EntityAIPanic(net.minecraft.entity.ai.EntityAIPanic) EntityAIWanderAvoidWater(net.minecraft.entity.ai.EntityAIWanderAvoidWater) Overwrite(org.spongepowered.asm.mixin.Overwrite)

Aggregations

EntityAILookIdle (net.minecraft.entity.ai.EntityAILookIdle)28 EntityAISwimming (net.minecraft.entity.ai.EntityAISwimming)26 EntityAIWatchClosest (net.minecraft.entity.ai.EntityAIWatchClosest)25 EntityPlayer (net.minecraft.entity.player.EntityPlayer)21 EntityAIWanderAvoidWater (net.minecraft.entity.ai.EntityAIWanderAvoidWater)15 EntityAIWander (net.minecraft.entity.ai.EntityAIWander)11 EntityAIAttackMelee (net.minecraft.entity.ai.EntityAIAttackMelee)9 EntityAIMoveTowardsRestriction (net.minecraft.entity.ai.EntityAIMoveTowardsRestriction)9 EntityAIHurtByTarget (net.minecraft.entity.ai.EntityAIHurtByTarget)8 EntityAIFollowParent (net.minecraft.entity.ai.EntityAIFollowParent)6 EntityAIPanic (net.minecraft.entity.ai.EntityAIPanic)6 EntityAITempt (net.minecraft.entity.ai.EntityAITempt)5 EntityAIMate (net.minecraft.entity.ai.EntityAIMate)4 EntityMob (net.minecraft.entity.monster.EntityMob)4 Item (net.minecraft.item.Item)3 Overwrite (org.spongepowered.asm.mixin.Overwrite)3 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 EntityAILeapAtTarget (net.minecraft.entity.ai.EntityAILeapAtTarget)2 EntityAIZombieAttack (net.minecraft.entity.ai.EntityAIZombieAttack)2 EntityAIFollowEnemy (de.sanandrew.mods.claysoldiers.entity.ai.EntityAIFollowEnemy)1