Package org.spout.vanilla.ai.sensor

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


    physics.setRestitution(0f);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(20);
    }

    NearbyComponentsSensor humanSensor = new NearbyComponentsSensor(getAI(), Human.class);
    humanSensor.setSensorRadius(16);
    getAI().registerSensor(humanSensor);
    getAI().registerGoal(new AttackPlayerGoal(getAI()));
    getAI().registerAction(new ActionAttack(getAI()));

    // Metadata values
View Full Code Here


    damage.getDamageLevel(Difficulty.EASY).setAmount(3);
    damage.getDamageLevel(Difficulty.NORMAL).setAmount(4);
    damage.getDamageLevel(Difficulty.HARD).setAmount(6);
    damage.getDamageLevel(Difficulty.HARDCORE).setAmount(damage.getDamageLevel(Difficulty.HARD).getAmount());

    final NearbyComponentsSensor humanSensor = new NearbyComponentsSensor(getAI(), Human.class);
    humanSensor.setSensorRadius(10);
    getAI().registerSensor(humanSensor);
    //Go attack nearby players AI
    getAI().registerGoal(new AttackPlayerGoal(getAI()));
    getAI().registerAction(new ActionAttack(getAI()));
View Full Code Here

TOP

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

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.