MCPcopy Create free account
hub / github.com/boxbeam/RedLib / pathfind

Method pathfind

src/redempt/redlib/misc/LocationUtils.java:412–414  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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*

Callers 1

directPathfindMethod · 0.95

Calls 11

scoreMethod · 0.95
distanceMethod · 0.95
tracePathMethod · 0.95
getAdjacentMethod · 0.95
testMethod · 0.80
removeMethod · 0.65
getTypeMethod · 0.45
equalsMethod · 0.45
getWorldMethod · 0.45
addMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected