Examples of AttackPlayerGoal


Examples of org.spout.vanilla.ai.goal.AttackPlayerGoal

    }

    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
    MetadataComponent meta = getOwner().add(MetadataComponent.class);
    meta.addMeta(Metadata.TYPE_BYTE, 16, VanillaData.STATE);
View Full Code Here

Examples of org.spout.vanilla.ai.goal.AttackPlayerGoal

    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()));

    // Add villager state metadata
    getOwner().add(MetadataComponent.class).addBoolMeta(16, VanillaData.WAS_VILLAGER);
  }
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.