Class FollowPlayerTask

java.lang.Object
net.glowstone.entity.ai.EntityTask
net.glowstone.entity.ai.FollowPlayerTask
All Implemented Interfaces:
Comparable<EntityTask>

public class FollowPlayerTask extends EntityTask
  • Constructor Details

    • FollowPlayerTask

      public FollowPlayerTask()
  • Method Details

    • isInstant

      public boolean isInstant()
      Description copied from class: EntityTask
      Whether this task is instant. An "instant" task will be executed every tick while the entity is alive.
      Specified by:
      isInstant in class EntityTask
      Returns:
      the entity in question.
    • getDurationMin

      public int getDurationMin()
      Description copied from class: EntityTask
      The minimum duration of this task. This value is ignored if this task is instant.
      Specified by:
      getDurationMin in class EntityTask
      Returns:
      the minimum duration of this task, in ticks.
    • getDurationMax

      public int getDurationMax()
      Description copied from class: EntityTask
      The maximum duration of this task. This value is ignored if this task is instant.
      Specified by:
      getDurationMax in class EntityTask
      Returns:
      the maximum duration of this task, in ticks.
    • shouldStart

      public boolean shouldStart(GlowLivingEntity entity)
      Description copied from class: EntityTask
      Whether the task should begin executing for this entity.
      Specified by:
      shouldStart in class EntityTask
      Parameters:
      entity - the entity in question.
      Returns:
      true if the task should start, false otherwise.
    • start

      public void start(GlowLivingEntity entity)
      Description copied from class: EntityTask
      Invoked when this task is about to start for this entity.
      Specified by:
      start in class EntityTask
      Parameters:
      entity - the entity in question.
    • end

      public void end(GlowLivingEntity entity)
      Description copied from class: EntityTask
      Invoked when this task is being ended for this entity.
      Specified by:
      end in class EntityTask
      Parameters:
      entity - the entity in question.
    • execute

      public void execute(GlowLivingEntity entity)
      Description copied from class: EntityTask
      Invoked each tick when this task is being executed for this entity.
      Specified by:
      execute in class EntityTask
      Parameters:
      entity - the entity in question.