Package net.citizensnpcs.api.ai.flocking
Class AlignmentBehavior
java.lang.Object
net.citizensnpcs.api.ai.flocking.AlignmentBehavior
- All Implemented Interfaces:
- FlockBehavior
Implements alignment flocking with a particular weight i.e. steering a flock of NPCs in line with each other.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetVector(NPC npc, Collection<NPC> nearby) Returns the displacement vector to be combined with otherFlockBehaviorvectors by aFlocker.
- 
Constructor Details- 
AlignmentBehaviorpublic AlignmentBehavior(double weight) 
 
- 
- 
Method Details- 
getVectorDescription copied from interface:FlockBehaviorReturns the displacement vector to be combined with otherFlockBehaviorvectors by aFlocker.- Specified by:
- getVectorin interface- FlockBehavior
- Parameters:
- nearby- the set of NPCs to consider for flocking purposes
- Returns:
- the displacement Vector
 
 
-