Class PathFinder

java.lang.Object
net.minecraft.world.level.pathfinder.PathFinder

public class PathFinder extends Object
  • Field Details

    • FUDGING

      private static final float FUDGING
      See Also:
    • neighbors

      private final Node[] neighbors
    • maxVisitedNodes

      private int maxVisitedNodes
    • nodeEvaluator

      private final NodeEvaluator nodeEvaluator
    • openSet

      private final BinaryHeap openSet
    • captureDebug

      private BooleanSupplier captureDebug
  • Constructor Details

    • PathFinder

      public PathFinder(NodeEvaluator nodeEvaluator, int maxVisitedNodes)
  • Method Details

    • setCaptureDebug

      public void setCaptureDebug(BooleanSupplier captureDebug)
    • setMaxVisitedNodes

      public void setMaxVisitedNodes(int maxVisitedNodes)
    • findPath

      public @Nullable Path findPath(PathNavigationRegion level, Mob entity, Set<BlockPos> targets, float maxPathLength, int reachRange, float maxVisitedNodesMultiplier)
    • findPath

      private @Nullable Path findPath(Node from, Map<Target,BlockPos> targetMap, float maxPathLength, int reachRange, float maxVisitedNodesMultiplier)
    • distance

      protected float distance(Node from, Node to)
    • getBestH

      private float getBestH(Node from, Set<Target> targets)
    • reconstructPath

      private Path reconstructPath(Node closest, BlockPos target, boolean reached)