Class Flocker

java.lang.Object
net.citizensnpcs.api.ai.flocking.Flocker
All Implemented Interfaces:
Runnable

public class Flocker extends Object implements Runnable
Implements a simple flocking controller as a Runnable. This should be run every tick, for example as part of an overridden Trait.run().
See Also:
  • Field Details

    • HIGH_INFLUENCE

      public static double HIGH_INFLUENCE
      Sample weight indicating high amount of influence from flocking.
    • LOW_INFLUENCE

      public static double LOW_INFLUENCE
      Sample weight indicating low amount of influence from flocking.
  • Constructor Details

  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • setMaxForce

      public void setMaxForce(double maxForce)
      Sets the maximum length of the resultant flocking vector.
      Parameters:
      maxForce - the new maximum length