Class RunToGroupGoal<T extends net.minecraft.world.entity.LivingEntity>

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
com.lightning.northstar.entity.goals.RunToGroupGoal<T>

public class RunToGroupGoal<T extends net.minecraft.world.entity.LivingEntity> extends net.minecraft.world.entity.ai.goal.Goal
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal

    net.minecraft.world.entity.ai.goal.Goal.Flag
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<T>
     
    protected final Predicate<net.minecraft.world.entity.LivingEntity>
     
    protected final float
     
    protected final net.minecraft.world.entity.PathfinderMob
     
    protected @Nullable net.minecraft.world.level.pathfinder.Path
     
    protected final net.minecraft.world.entity.ai.navigation.PathNavigation
     
    protected final Predicate<net.minecraft.world.entity.LivingEntity>
     
    protected T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier)
     
    RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity)
     
    RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, Predicate<net.minecraft.world.entity.LivingEntity> pAvoidPredicate, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether an in-progress EntityAIBase should continue executing
    boolean
     
    void
    Execute a one shot task or start executing a continuous task
    void
    Reset the task's internal state.
    void
    Keep ticking a continuous task that has already been started

    Methods inherited from class net.minecraft.world.entity.ai.goal.Goal

    adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • mob

      protected final net.minecraft.world.entity.PathfinderMob mob
    • toAvoid

      @Nullable protected T extends net.minecraft.world.entity.LivingEntity toAvoid
    • maxDist

      protected final float maxDist
    • path

      @Nullable protected @Nullable net.minecraft.world.level.pathfinder.Path path
    • pathNav

      protected final net.minecraft.world.entity.ai.navigation.PathNavigation pathNav
    • avoidClass

      protected final Class<T extends net.minecraft.world.entity.LivingEntity> avoidClass
    • avoidPredicate

      protected final Predicate<net.minecraft.world.entity.LivingEntity> avoidPredicate
    • predicateOnAvoidEntity

      protected final Predicate<net.minecraft.world.entity.LivingEntity> predicateOnAvoidEntity
  • Constructor Details

    • RunToGroupGoal

      public RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier)
    • RunToGroupGoal

      public RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, Predicate<net.minecraft.world.entity.LivingEntity> pAvoidPredicate, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity)
    • RunToGroupGoal

      public RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class net.minecraft.world.entity.ai.goal.Goal
    • canContinueToUse

      public boolean canContinueToUse()
      Returns whether an in-progress EntityAIBase should continue executing
      Overrides:
      canContinueToUse in class net.minecraft.world.entity.ai.goal.Goal
    • start

      public void start()
      Execute a one shot task or start executing a continuous task
      Overrides:
      start in class net.minecraft.world.entity.ai.goal.Goal
    • stop

      public void stop()
      Reset the task's internal state. Called when this task is interrupted by another one
      Overrides:
      stop in class net.minecraft.world.entity.ai.goal.Goal
    • tick

      public void tick()
      Keep ticking a continuous task that has already been started
      Overrides:
      tick in class net.minecraft.world.entity.ai.goal.Goal