Package net.citizensnpcs.api.ai.flocking
Interface FlockBehavior
- All Known Implementing Classes:
AlignmentBehavior
,CohesionBehavior
,SeparationBehavior
public interface FlockBehavior
An interface to be used with an
Flocker
to represent a certain type of behavior such as cohesion, alignment
or separation.-
Method Summary
Modifier and TypeMethodDescriptiongetVector
(NPC npc, Collection<NPC> nearby) Returns the displacement vector to be combined with otherFlockBehavior
vectors by aFlocker
.
-
Method Details
-
getVector
Returns the displacement vector to be combined with otherFlockBehavior
vectors by aFlocker
.- Parameters:
nearby
- the set of NPCs to consider for flocking purposes- Returns:
- the displacement
Vector
-