Examples of DesireItem


Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

      context.atLocation(inData.location.toBukkitLocation());

    RemoteEntity entity = context.create();
    for(DesireData data : inData.movementDesires)
    {
      DesireItem item = data.create(entity);
      entity.getMind().addMovementDesire(item.getDesire(), item.getPriority());
    }

    for(DesireData data : inData.actionDesires)
    {
      DesireItem item = data.create(entity);
      entity.getMind().addTargetingDesire(item.getDesire(), item.getPriority());
    }

    for(BehaviorData data : inData.behaviors)
    {
      entity.getMind().addBehaviour(data.create(entity));
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

    this.speed = inEntity.getSpeed();
    this.pathfindingRange = inEntity.getPathfindingRange();
    List<DesireData> action = new ArrayList<DesireData>();
    for(int i = 0; i < inEntity.getMind().getTargetingDesires().size(); i++)
    {
      DesireItem desire = inEntity.getMind().getTargetingDesires().get(i);
      if(!desire.getDesire().getClass().isAnnotationPresent(IgnoreSerialization.class))
        action.add(new DesireData(desire));
    }

    this.actionDesires = action.toArray(new DesireData[action.size()]);
    List<DesireData> movement = new ArrayList<DesireData>();
    for(int i = 0; i < inEntity.getMind().getMovementDesires().size(); i++)
    {
      DesireItem desire = inEntity.getMind().getMovementDesires().get(i);
      if(!desire.getDesire().getClass().isAnnotationPresent(IgnoreSerialization.class))
        movement.add(new DesireData(desire));
    }

    this.movementDesires = movement.toArray(new DesireData[movement.size()]);
    this.behaviors = new BehaviorData[inEntity.getMind().getBehaviours().size()];
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

          values[i] = inEntity.getManager();
        else
          values[i] = EntityData.objectParser.deserialize(this.parameters[i]);
      }
      Desire d = con.newInstance(values);
      return new DesireItem(d, this.priority);
    }
    catch(Exception e)
    {
      RemoteEntities.getInstance().getLogger().warning("Error when trying to deserialize desire with type " + this.type + ": ");
      RemoteEntities.getInstance().getLogger().warning(e.getMessage());
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  public static DesireItem[] getDefaultMovementDesires()
  {
    try
    {
      return new DesireItem[] {
          new DesireItem(new DesireSwim(), 0),
          new DesireItem(new DesirePanic(1.25D), 1),
          new DesireItem(new DesireBreed(), 2),
          new DesireItem(new DesireTempt(Item.b(Items.WHEAT), false, 1.1D), 3),
          new DesireItem(new DesireFollowParent(), 4),
          new DesireItem(new DesireEatGrass(), 5),
          new DesireItem(new DesireWanderAround(), 6),
          new DesireItem(new DesireLookAtNearest(EntityHuman.class, 6), 7),
          new DesireItem(new DesireLookRandomly(), 8)
      };
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  public static DesireItem[] getDefaultMovementDesires()
  {
    try
    {
      return new DesireItem[] {
          new DesireItem(new DesireSwim(), 1),
          new DesireItem(new DesirePanic(2.0D), 1),
          new DesireItem(new DesireBreed(), 2),
          new DesireItem(new DesireTempt(Item.b(Items.WHEAT), false, 1.25D), 3),
          new DesireItem(new DesireFollowParent(1.25D), 4),
          new DesireItem(new DesireWanderAround(), 5),
          new DesireItem(new DesireLookAtNearest(EntityHuman.class, 6), 6),
          new DesireItem(new DesireLookRandomly(), 7)
      };
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  public static DesireItem[] getDefaultMovementDesires()
  {
    try
    {
      return new DesireItem[] {
          new DesireItem(new DesireSwim(), 0),
          new DesireItem(new DesirePanic(2.0D), 1),
          new DesireItem(new DesireBreed(), 2),
          new DesireItem(new DesireTempt(Item.b(Items.WHEAT), false, 1.25D), 3),
          new DesireItem(new DesireFollowParent(1.25D), 4),
          new DesireItem(new DesireWanderAround(), 5),
          new DesireItem(new DesireLookAtNearest(EntityHuman.class, 6), 6),
          new DesireItem(new DesireLookRandomly(), 7)
      };
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

    return this.m_remoteEntity.getSound(EntitySound.DEATH);
  }

  public static DesireItem[] getDefaultMovementDesires()
  {
    return new DesireItem[] { new DesireItem(new DesireRangedAttack(RemoteProjectileType.SMALL_FIREBALL, 20), 1) };
  }
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  }

  public static DesireItem[] getDefaultTargetingDesires()
  {
    return new DesireItem[] {
        new DesireItem(new DesireFindAttackingTarget(64, true, true), 1),
        new DesireItem(new DesireFindNearestTarget(EntityHuman.class, 64, true, 0), 2)
    };
  }
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  public static DesireItem[] getDefaultMovementDesires()
  {
    try
    {
      return new DesireItem[] {
          new DesireItem(new DesireSwim(), 0),
          new DesireItem(new DesireAvoidSpecific(8f, 0.6D, 0.6D, EntityZombie.class), 1),
          new DesireItem(new DesireTradeWithPlayer(), 1),
          new DesireItem(new DesireLookAtTrader(8), 1),
          new DesireItem(new DesireMoveIndoors(), 2),
          new DesireItem(new DesireRestrictOpenDoor(), 3),
          new DesireItem(new DesireOpenDoor(true, false), 4),
          new DesireItem(new DesireMoveTowardsRestriction(), 5),
          new DesireItem(new DesireMakeLove(), 6),
          new DesireItem(new DesireAcceptFlower(), 7),
          new DesireItem(new DesirePlay(0.32D), 8),
          new DesireItem(new DesireInteract(EntityHuman.class, 3, 1f), 9),
          new DesireItem(new DesireInteract(EntityVillager.class, 5, 0.2f), 9),
          new DesireItem(new DesireWanderAround(), 9),
          new DesireItem(new DesireLookAtNearest(EntityInsentient.class, 8), 10)
      };
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of de.kumpelblase2.remoteentities.api.thinking.DesireItem

  public static DesireItem[] getDefaultMovementDesires()
  {
    try
    {
      return new DesireItem[] {
          new DesireItem(new DesireSwim(), 0),
          new DesireItem(new DesirePanic(1.25D), 1),
          new DesireItem(new DesireFollowCarrotStick(0.3f), 2),
          new DesireItem(new DesireBreed(), 3),
          new DesireItem(new DesireTempt(Item.b(Items.CARROT), false, 1.2D), 4),
          new DesireItem(new DesireTempt(Item.b(Items.CARROT_STICK), false, 1.2D), 4),
          new DesireItem(new DesireFollowParent(), 5),
          new DesireItem(new DesireWanderAround(), 6),
          new DesireItem(new DesireLookAtNearest(EntityHuman.class, 6), 7),
          new DesireItem(new DesireLookRandomly(), 8)
      };
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.