Package net.minecraft.entity.ai.EntityAITasks

Examples of net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry


  private void cancelCurrentTasks(EntityLiving ent) {
    Iterator iterator = ent.tasks.taskEntries.iterator();

    List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<EntityAITasks.EntityAITaskEntry>();
    while (iterator.hasNext()) {
        EntityAITaskEntry entityaitaskentry = (EntityAITasks.EntityAITaskEntry)iterator.next();
        if(entityaitaskentry != null) {
          currentTasks.add(entityaitaskentry);
        }
    }   
    //Only available way to stop current execution is to remove all current tasks, then re-add them
View Full Code Here


    for (Object obj : list) {
      EntityMob mob = (EntityMob) obj;

      for (Object objT : mob.tasks.taskEntries) {
        EntityAITaskEntry task = (EntityAITaskEntry) objT;
        if (task.action instanceof AIAvoidPlayers)
          return storedData;
      }

      mob.tasks.addTask(3, new AIAvoidPlayers(mob, 6.0f, 0.25f, 0.3f));
View Full Code Here

  private int healTimer = 0;
 
  public EntityCluckington(World world) {
    super(world);
        setSize(0.6F, 0.8F);
    EntityAITaskEntry panic  = (EntityAITaskEntry)tasks.taskEntries.get(1);
    EntityAITaskEntry mate   = (EntityAITaskEntry)tasks.taskEntries.get(2);
    EntityAITaskEntry tempt  = (EntityAITaskEntry)tasks.taskEntries.get(3);
    EntityAITaskEntry follow = (EntityAITaskEntry)tasks.taskEntries.get(4);
    tasks.removeTask(panic.action);
    tasks.removeTask(mate.action);
    tasks.removeTask(tempt.action);
    tasks.removeTask(follow.action);
    tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityZombie.class, 1.0D, false));
View Full Code Here

        int matePriority = -1;
        int sitPriority = -1;
        boolean hasDespawn = false;
        Iterator<EntityAITaskEntry> it = ((List<EntityAITaskEntry>)animal.tasks.taskEntries).iterator();
        while(it.hasNext()) {
            EntityAITaskEntry task = it.next();
            if(tame && task.action instanceof EntityAISit) {
                sitPriority = task.priority;
                it.remove();
            } else if(task.action instanceof EntityAIMate) {
                matePriority = task.priority;
View Full Code Here

TOP

Related Classes of net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.