Module pathfinder

Module pathfinder 

Source
Expand description

A pathfinding plugin to make bots able to traverse the world.

For the new functions on Client that the pathfinder adds, see PathfinderClientExt.

Much of this code is based on Baritone.

Modules§

astar
costs
custom_state
debug
goals
The goals that a pathfinder can try to reach.
mining
moves
rel_block_pos
simulation
Simulate the Minecraft world, currently only used for tests.
world

Structs§

CalculatePathCtx
ComputePath
ExecutingPath
A component that’s present on clients that are actively following a pathfinder path.
GotoEvent
Send this event to start pathfinding to the given goal.
PathFoundEvent
Pathfinder
A component that makes this client able to pathfind.
PathfinderOpts
Configuration options that the pathfinder will use when calculating and executing a path.
PathfinderPlugin
StopPathfindingEvent

Traits§

PathfinderClientExt

Functions§

add_default_pathfinder
calculate_path
Calculate the PathFoundEvent for the given pathfinder options.
call_successors_fn
check_for_path_obstruction
check_node_reached
check_path_obstructed
Checks whether the path has been obstructed, and returns Some(index) if it has been. The index is of the first obstructed node.
goto_listener
handle_stop_pathfinding_event
handle_tasks
path_found_listener
player_pos_to_block_pos
Convert a player position to a block position, used internally in the pathfinder.
recalculate_if_has_goal_but_no_path
recalculate_near_end_of_path
stop_pathfinding_on_instance_change
tick_execute_path
timeout_movement