Package org.spout.vanilla.ai.sensor

Examples of org.spout.vanilla.ai.sensor.NearbyMaterialHolderSensor


    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));

    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(4);
    }
    NearbyMaterialHolderSensor materialHolderSensor = new NearbyMaterialHolderSensor(getAI(), VanillaMaterials.SEEDS);
    materialHolderSensor.setSensorRadius(16);
    getAI().registerSensor(materialHolderSensor);
    getAI().registerGoal(new FollowMaterialHolderGoal(getAI()));
    getAI().registerAction(new FollowMaterialHolderAction(getAI()));
  }
View Full Code Here


    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));

    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(10);
    }
    NearbyMaterialHolderSensor materialHolderSensor = new NearbyMaterialHolderSensor(getAI(), VanillaMaterials.WHEAT);
    materialHolderSensor.setSensorRadius(16);
    getAI().registerSensor(materialHolderSensor);
    getAI().registerGoal(new FollowMaterialHolderGoal(getAI()));
    getAI().registerAction(new FollowMaterialHolderAction(getAI()));

    // Add metadata for the wool state of the Sheep
View Full Code Here

    dropComponent.addDrop(new ItemStack(VanillaMaterials.LEATHER, random.nextInt(2)));
    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(10);
    }
    NearbyMaterialHolderSensor materialHolderSensor = new NearbyMaterialHolderSensor(getAI(), VanillaMaterials.WHEAT);
    materialHolderSensor.setSensorRadius(16);
    getAI().registerSensor(materialHolderSensor);
    getAI().registerGoal(new FollowMaterialHolderGoal(getAI()));
    getAI().registerAction(new FollowMaterialHolderAction(getAI()));
  }
View Full Code Here

    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));

    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(10);
    }
    NearbyMaterialHolderSensor materialHolderSensor = new NearbyMaterialHolderSensor(getAI(), VanillaMaterials.CARROT);
    materialHolderSensor.setSensorRadius(16);
    getAI().registerSensor(materialHolderSensor);
    getAI().registerGoal(new FollowMaterialHolderGoal(getAI()));
    getAI().registerAction(new FollowMaterialHolderAction(getAI()));

    // Add metadata for saddled state
View Full Code Here

TOP

Related Classes of org.spout.vanilla.ai.sensor.NearbyMaterialHolderSensor

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.