Class BuildLimitPathFinder

java.lang.Object
com.zenith.feature.pathfinder.process.elytra.BuildLimitPathFinder
All Implemented Interfaces:
IElytraPathFinder

public class BuildLimitPathFinder extends Object implements IElytraPathFinder
  • Constructor Details

  • Method Details

    • generateDirectPath

      public Pair<List<BlockPos>, Boolean> generateDirectPath(BlockPos start, BlockPos destination, int bufferDistance, int maxPathSize)
      Generates a direct path from the start to the destination at a fixed y-level above build limit
      Parameters:
      start -
      destination -
      bufferDistance - Distance from the destination to halt the direct path
      maxPathSize - Maximum number of nodes in the returned path
      Returns:
      A tuple containing the path as a list of BlockPos and a boolean indicating if the path is complete
    • generateTransitionUp

      public Pair<List<BlockPos>, Boolean> generateTransitionUp(BlockPos start, BlockPos destination)
      Attempts to find an open spot in the sky to transition up above the build limit so a simple direct path can be followed
      Parameters:
      start -
      destination -
      Returns:
      A tuple containing the path that transitions above build limit and a boolean indicating if a transition was found
    • generateTransitionDown

      public Pair<List<BlockPos>, Boolean> generateTransitionDown(BlockPos start)
      Attempts to find an open spot in the sky to transition down to a flight level the nether pathfinder can navigiate at.
      Parameters:
      start -
      Returns:
      A tuple containing the path (single point) and a boolean indicating if a transition point was found
    • isSkyClear

      public boolean isSkyClear(BlockPos pos, int y)
    • pathFindAsync

      public CompletableFuture<UnpackedSegment> pathFindAsync(BlockPos src, BlockPos dst)
      Specified by:
      pathFindAsync in interface IElytraPathFinder