Class CreateGroupGoal<T extends MobEntity>

java.lang.Object
me.arcademadness.omni_dungeon.controllers.goals.CreateGroupGoal<T>
Type Parameters:
T - the type of mob that will use this goal
All Implemented Interfaces:
Goal<T>

public class CreateGroupGoal<T extends MobEntity> extends Object implements Goal<T>
A Goal for when a Mob has no group. Makes a new group where the MobEntity is the Queen. Should be a lower priority than FindGroupGoal which attempts to join existing groups. Should be a higher priority than MergeGroupGoal which only works when the MobEntity has a group to merge.
  • Constructor Details

    • CreateGroupGoal

      public CreateGroupGoal(int priority, int maxGroupSize)
  • Method Details

    • getPriority

      public int getPriority()
      Description copied from interface: Goal
      Lower number = higher priority. E.g., 0 = highest.
      Specified by:
      getPriority in interface Goal<T extends MobEntity>
    • shouldActivate

      public boolean shouldActivate(T entity)
      Specified by:
      shouldActivate in interface Goal<T extends MobEntity>
      Returns:
      if this goal should be activated
    • computeIntent

      public Optional<ControlIntent> computeIntent(T entity)
      Description copied from interface: Goal
      Returns an optional ControlIntent if this goal wants the entity to act.
      Specified by:
      computeIntent in interface Goal<T extends MobEntity>