java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
johnsmith.enchantingoverhauled.entity.ai.goal.DashGoal

public class DashGoal extends net.minecraft.world.entity.ai.goal.Goal
AI Goal that propels AbstractFlyingBookEntity instances via direct 3D velocity impulses to evade melee strikes, back off from ranged targets, or close long pursuit gaps.

Optimized to eliminate all 3D A* pathfinding calls (previously up to 49 per dash) and use branch-and-bound score pruning so raycasts and AABB collision checks only run on viable candidates.

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    DashGoal(AbstractFlyingBookEntity mob, double speedModifier, float minSafeDistance, float maxPursuitDistance, int maxInterruptTicks)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
     
    void
     
    void
     

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

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

    Methods inherited from class java.lang.Object

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

    • DashGoal

      public DashGoal(AbstractFlyingBookEntity mob, double speedModifier, float minSafeDistance, float maxPursuitDistance, int maxInterruptTicks)
  • Method Details

    • canUse

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

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

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.ai.goal.Goal
    • canContinueToUse

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

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