Finds the fastest path between a starting and ending location using A @param start The starting block @param end The ending block @param max The max number of locations to be checked - use to limit runtime @return A Deque of locations leading from the start to the end, or the closest block if
(Block start, Block end, int max)
| 410 | * be completed |
| 411 | */ |
| 412 | public static Deque<Location> pathfind(Block start, Block end, int max) { |
| 413 | return pathfind(start, end, max, b -> !b.getType().isSolid()); |
| 414 | } |
| 415 | |
| 416 | /** |
| 417 | * Finds the fastest path between a starting and ending location using A* |