Class TargetNearestGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
com.pixelmonmod.pixelmon.ai.TargetGoal
com.pixelmonmod.pixelmon.ai.TargetNearestGoal
Direct Known Subclasses:
TargetNearestGoalInFieldOfView

public class TargetNearestGoal extends TargetGoal
  • 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 inherited from class com.pixelmonmod.pixelmon.ai.TargetGoal

    shouldCheckSight, targetDistance, taskOwner
  • Constructor Summary

    Constructors
    Constructor
    Description
    TargetNearestGoal(net.minecraft.world.entity.Mob entity, float targetRange, boolean shouldCheckSight)
     
    TargetNearestGoal(net.minecraft.world.entity.Mob entity, float targetRange, boolean shouldCheckSight, boolean mustReach)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether an in-progress EntityAIBase should continue executing.
    boolean
    Returns whether the EntityAIBase should begin execution.
    void
    setTargetDistance(float targetDistance)
     
    void
    Execute a one shot task or start executing a continuous task
    void
    Resets the task.
    void
     

    Methods inherited from class com.pixelmonmod.pixelmon.ai.TargetGoal

    isSuitableTarget

    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
  • Constructor Details

    • TargetNearestGoal

      public TargetNearestGoal(net.minecraft.world.entity.Mob entity, float targetRange, boolean shouldCheckSight)
    • TargetNearestGoal

      public TargetNearestGoal(net.minecraft.world.entity.Mob entity, float targetRange, boolean shouldCheckSight, boolean mustReach)
  • Method Details

    • setTargetDistance

      public void setTargetDistance(float targetDistance)
    • canUse

      public boolean canUse()
      Returns whether the EntityAIBase should begin execution.
      Specified by:
      canUse 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 TargetGoal
    • tick

      public void tick()
      Overrides:
      tick in class TargetGoal
    • stop

      public void stop()
      Description copied from class: TargetGoal
      Resets the task.
      Overrides:
      stop in class TargetGoal
    • canContinueToUse

      public boolean canContinueToUse()
      Description copied from class: TargetGoal
      Returns whether an in-progress EntityAIBase should continue executing.
      Overrides:
      canContinueToUse in class TargetGoal
      Returns:
      Whether an in-progress EntityAIBase should continue executing.