Class PathNavigation

java.lang.Object
net.minecraft.world.entity.ai.navigation.PathNavigation
Direct Known Subclasses:
FlyingPathNavigation, GroundPathNavigation, WaterBoundPathNavigation

public abstract class PathNavigation extends Object
  • Field Details

    • MAX_TIME_RECOMPUTE

      private static final int MAX_TIME_RECOMPUTE
      See Also:
      Constant Field Values
    • mob

      protected final Mob mob
    • level

      protected final Level level
    • path

      @Nullable protected Path path
    • speedModifier

      protected double speedModifier
    • tick

      protected int tick
    • lastStuckCheck

      protected int lastStuckCheck
    • lastStuckCheckPos

      protected Vec3 lastStuckCheckPos
    • timeoutCachedNode

      protected Vec3i 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 NodeEvaluator nodeEvaluator
    • targetPos

      private BlockPos targetPos
    • reachRange

      private int reachRange
    • maxVisitedNodesMultiplier

      private float maxVisitedNodesMultiplier
    • pathFinder

      private final PathFinder pathFinder
    • isStuck

      private boolean isStuck
  • Constructor Details

    • PathNavigation

      public PathNavigation(Mob p_26515_, Level p_26516_)
  • Method Details

    • resetMaxVisitedNodesMultiplier

      public void resetMaxVisitedNodesMultiplier()
    • setMaxVisitedNodesMultiplier

      public void setMaxVisitedNodesMultiplier(float p_26530_)
    • getTargetPos

      public BlockPos getTargetPos()
    • createPathFinder

      protected abstract PathFinder createPathFinder(int p_26531_)
    • setSpeedModifier

      public void setSpeedModifier(double p_26518_)
    • hasDelayedRecomputation

      public boolean hasDelayedRecomputation()
    • recomputePath

      public void recomputePath()
    • createPath

      @Nullable public final Path createPath(double p_26525_, double p_26526_, double p_26527_, int p_26528_)
    • createPath

      @Nullable public Path createPath(Stream<BlockPos> p_26557_, int p_26558_)
    • createPath

      @Nullable public Path createPath(Set<BlockPos> p_26549_, int p_26550_)
    • createPath

      @Nullable public Path createPath(BlockPos p_26546_, int p_26547_)
    • createPath

      @Nullable public Path createPath(BlockPos p_148219_, int p_148220_, int p_148221_)
    • createPath

      @Nullable public Path createPath(Entity p_26534_, int p_26535_)
    • createPath

      @Nullable protected Path createPath(Set<BlockPos> p_26552_, int p_26553_, boolean p_26554_, int p_26555_)
    • createPath

      @Nullable protected Path createPath(Set<BlockPos> p_148223_, int p_148224_, boolean p_148225_, int p_148226_, float p_148227_)
    • moveTo

      public boolean moveTo(double p_26520_, double p_26521_, double p_26522_, double p_26523_)
    • moveTo

      public boolean moveTo(Entity p_26532_, double p_26533_)
    • moveTo

      public boolean moveTo(@Nullable Path p_26537_, double p_26538_)
    • getPath

      @Nullable public Path getPath()
    • tick

      public void tick()
    • followThePath

      protected void followThePath()
    • shouldTargetNextNodeInDirection

      private boolean shouldTargetNextNodeInDirection(Vec3 p_26560_)
    • doStuckDetection

      protected void doStuckDetection(Vec3 p_26539_)
    • timeoutPath

      private void timeoutPath()
    • resetStuckTimeout

      private void resetStuckTimeout()
    • isDone

      public boolean isDone()
    • isInProgress

      public boolean isInProgress()
    • stop

      public void stop()
    • getTempMobPos

      protected abstract Vec3 getTempMobPos()
    • canUpdatePath

      protected abstract boolean canUpdatePath()
    • isInLiquid

      protected boolean isInLiquid()
    • trimPath

      protected void trimPath()
    • canMoveDirectly

      protected abstract boolean canMoveDirectly(Vec3 p_26540_, Vec3 p_26541_, int p_26542_, int p_26543_, int p_26544_)
    • isStableDestination

      public boolean isStableDestination(BlockPos p_26545_)
    • getNodeEvaluator

      public NodeEvaluator getNodeEvaluator()
    • setCanFloat

      public void setCanFloat(boolean p_26563_)
    • canFloat

      public boolean canFloat()
    • recomputePath

      public void recomputePath(BlockPos p_26562_)
    • getMaxDistanceToWaypoint

      public float getMaxDistanceToWaypoint()
    • isStuck

      public boolean isStuck()