Class SprayableEntity.EscapeSprayGoal<T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity>

java.lang.Object
net.minecraft.entity.ai.goal.Goal
dev.jaxydog.astral.utility.injected.SprayableEntity.EscapeSprayGoal<T>
Type Parameters:
T - The entity type.
Enclosing interface:
SprayableEntity

public static class SprayableEntity.EscapeSprayGoal<T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity> extends net.minecraft.entity.ai.goal.Goal
A goal that causes a sprayed entity to run away from its sprayer.
Since:
1.6.0
  • Nested Class Summary

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

    net.minecraft.entity.ai.goal.Goal.Control
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final T
    The entity instance.
    protected @Nullable net.minecraft.entity.ai.pathing.Path
    The movement path.
    protected final double
    The speed at which to run.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EscapeSprayGoal(T entity, double speed)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected boolean
    Attempts to find a location to run towards.
    boolean
     
    void
     
    void
     

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

    canStop, getControls, getTickCount, setControls, shouldRunEveryTick, tick, toGoalTicks, toString

    Methods inherited from class java.lang.Object

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

    • entity

      protected final T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity entity
      The entity instance.
      Since:
      1.6.0
    • speed

      protected final double speed
      The speed at which to run.
      Since:
      1.6.0
    • path

      @Nullable protected @Nullable net.minecraft.entity.ai.pathing.Path path
      The movement path.
      Since:
      1.6.0
  • Constructor Details

    • EscapeSprayGoal

      public EscapeSprayGoal(T entity, double speed)
      Parameters:
      entity - The entity instance.
      speed - The speed at which to run.
      Since:
      1.6.0
  • Method Details

    • findTarget

      protected boolean findTarget()
      Attempts to find a location to run towards.
      Returns:
      Whether a target path was found.
      Since:
      1.6.0
    • canStart

      public boolean canStart()
      Specified by:
      canStart in class net.minecraft.entity.ai.goal.Goal
    • start

      public void start()
      Overrides:
      start in class net.minecraft.entity.ai.goal.Goal
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class net.minecraft.entity.ai.goal.Goal
    • stop

      public void stop()
      Overrides:
      stop in class net.minecraft.entity.ai.goal.Goal