Package-level declarations

Types

Link copied to clipboard
abstract class AStarSearch<N, T>(limits: Limits) : Search<T>

An A* route search over nodes N that runs in slices of Limits.visitedNodesPerSlice within limits.

Link copied to clipboard
class BackgroundSearch<T>(level: () -> Level?, newTerrain: (LevelBlocks) -> Terrain = ::Terrain, executor: Executor = ForkJoinPool.commonPool())

Runs one route search at a time on executor, a slice per poll. The search reads a copy of its region of level through the terrain newTerrain makes, and starts over when a block it looked at changes. The owner reports changes with blockChanged and levelChanged.

Link copied to clipboard
class BlockDestination(positions: Collection<BlockPos>) : Destination

From LiquidBounce: Goal.kt

Link copied to clipboard
interface Destination

Where a route should end, in blocks the feet are in.

Link copied to clipboard
enum class Failure : Enum<Failure>

From LiquidBounce: RouteSearch.kt

Link copied to clipboard
class Limits(val maxLength: Double, val maxWaypoints: Int = 24, val maxVisitedNodes: Int, val visitedNodesPerSlice: Int = 400, val maxComputeNanos: Long = TimeUnit.MILLISECONDS.toNanos(150))

From LiquidBounce: RouteSearch.kt

Link copied to clipboard
data class NearDestination(val center: Vec3, val radius: Double) : Destination

Feet within radius of center; vertically from its block, as feet on farmland rest below the block top.

Link copied to clipboard
sealed interface Outcome<out T>
Link copied to clipboard
class Replanner<T>(level: () -> Level?, verticalMargin: Int, newTerrain: (LevelBlocks) -> Terrain = ::Terrain, executor: Executor = ForkJoinPool.commonPool())

Searches routes for a navigator whose goal is given anew every tick. Goals beyond half the route length or in chunks not loaded are searched in stages. The owner reports changes of level with blockChanged and levelChanged.

Link copied to clipboard
interface Search<out T>

A search that is advanced in slices until it has a result.

Link copied to clipboard
class StageDestination(val goal: Destination, start: Vec3, range: Double, terrain: Terrain) : Destination

goal, or a stage on the way to it: feet range blocks from start or next to blocks terrain does not know, and at least MIN_PROGRESS blocks closer to goal, so stages never lead back.