Class PathNavigator

java.lang.Object
net.minecraft.pathfinding.PathNavigator
Direct Known Subclasses:
FlyingPathNavigator, GroundPathNavigator, SwimmerPathNavigator

public abstract class PathNavigator extends Object
  • Field Details

    • mob

      protected final MobEntity mob
    • level

      protected final World level
    • path

      @Nullable protected Path path
    • speedModifier

      protected double speedModifier
    • tick

      protected int tick
    • lastStuckCheck

      protected int lastStuckCheck
    • lastStuckCheckPos

      protected Vector3d lastStuckCheckPos
    • timeoutCachedNode

      protected Vector3i timeoutCachedNode
    • timeoutTimer

      protected long timeoutTimer
    • lastTimeoutCheck

      protected long lastTimeoutCheck
    • timeoutLimit

      protected double timeoutLimit
    • maxDistanceToWaypoint

      protected float maxDistanceToWaypoint
    • hasDelayedRecomputation

      protected boolean hasDelayedRecomputation
    • timeLastRecompute

      protected long timeLastRecompute
    • nodeEvaluator

      protected NodeProcessor nodeEvaluator
    • targetPos

      private BlockPos targetPos
    • reachRange

      private int reachRange
    • maxVisitedNodesMultiplier

      private float maxVisitedNodesMultiplier
    • pathFinder

      private final PathFinder pathFinder
    • isStuck

      private boolean isStuck
  • Constructor Details

    • PathNavigator

      public PathNavigator(MobEntity p_i1671_1_, World p_i1671_2_)
  • Method Details

    • resetMaxVisitedNodesMultiplier

      public void resetMaxVisitedNodesMultiplier()
    • setMaxVisitedNodesMultiplier

      public void setMaxVisitedNodesMultiplier(float p_226335_1_)
    • getTargetPos

      public BlockPos getTargetPos()
    • createPathFinder

      protected abstract PathFinder createPathFinder(int p_179679_1_)
    • setSpeedModifier

      public void setSpeedModifier(double p_75489_1_)
    • hasDelayedRecomputation

      public boolean hasDelayedRecomputation()
    • recomputePath

      public void recomputePath()
    • createPath

      @Nullable public final Path createPath(double p_225466_1_, double p_225466_3_, double p_225466_5_, int p_225466_7_)
    • createPath

      @Nullable public Path createPath(Stream<BlockPos> p_225463_1_, int p_225463_2_)
    • createPath

      @Nullable public Path createPath(Set<BlockPos> p_241390_1_, int p_241390_2_)
    • createPath

      @Nullable public Path createPath(BlockPos p_179680_1_, int p_179680_2_)
    • createPath

      @Nullable public Path createPath(Entity p_75494_1_, int p_75494_2_)
    • createPath

      @Nullable protected Path createPath(Set<BlockPos> p_225464_1_, int p_225464_2_, boolean p_225464_3_, int p_225464_4_)
    • moveTo

      public boolean moveTo(double p_75492_1_, double p_75492_3_, double p_75492_5_, double p_75492_7_)
    • moveTo

      public boolean moveTo(Entity p_75497_1_, double p_75497_2_)
    • moveTo

      public boolean moveTo(@Nullable Path p_75484_1_, double p_75484_2_)
    • getPath

      @Nullable public Path getPath()
    • tick

      public void tick()
    • followThePath

      protected void followThePath()
    • shouldTargetNextNodeInDirection

      private boolean shouldTargetNextNodeInDirection(Vector3d p_234112_1_)
    • doStuckDetection

      protected void doStuckDetection(Vector3d p_179677_1_)
    • timeoutPath

      private void timeoutPath()
    • resetStuckTimeout

      private void resetStuckTimeout()
    • isDone

      public boolean isDone()
    • isInProgress

      public boolean isInProgress()
    • stop

      public void stop()
    • getTempMobPos

      protected abstract Vector3d getTempMobPos()
    • canUpdatePath

      protected abstract boolean canUpdatePath()
    • isInLiquid

      protected boolean isInLiquid()
    • trimPath

      protected void trimPath()
    • canMoveDirectly

      protected abstract boolean canMoveDirectly(Vector3d p_75493_1_, Vector3d p_75493_2_, int p_75493_3_, int p_75493_4_, int p_75493_5_)
    • isStableDestination

      public boolean isStableDestination(BlockPos p_188555_1_)
    • getNodeEvaluator

      public NodeProcessor getNodeEvaluator()
    • setCanFloat

      public void setCanFloat(boolean p_212239_1_)
    • canFloat

      public boolean canFloat()
    • recomputePath

      public void recomputePath(BlockPos p_220970_1_)
    • isStuck

      public boolean isStuck()