Botcraft 1.21.4
Loading...
Searching...
No Matches
PathfindingTask.cpp File Reference

Go to the source code of this file.

Classes

class  Botcraft::PathfindingBlockstate
 
struct  Botcraft::PosFloatPairHash
 

Namespaces

namespace  Botcraft
 

Functions

std::vector< std::pair< Position, float > > Botcraft::FindPath (const BehaviourClient &client, const Position &start, const Position &end, const int dist_tolerance, const int min_end_dist, const int min_end_dist_xz, const bool allow_jump)
 Not actually a task.
 
bool Botcraft::Move (BehaviourClient &client, std::shared_ptr< LocalPlayer > &local_player, const Vector3< double > &target_position, const float speed_factor, const bool sprint)
 
void Botcraft::AdjustPosSpeed (BehaviourClient &client, const Vector3< double > &target)
 
Status Botcraft::GoToImpl (BehaviourClient &client, const Vector3< double > &goal, const int dist_tolerance, const int min_end_dist, const int min_end_dist_xz, const bool allow_jump, const bool sprint, float speed_factor)
 
Status Botcraft::GoTo (BehaviourClient &client, const Position &goal, const int dist_tolerance=0, const int min_end_dist=0, const int min_end_dist_xz=0, const bool allow_jump=true, const bool sprint=true, const float speed_factor=1.0f)
 Find a path to a block position and navigate to it.
 
Status Botcraft::GoToBlackboard (BehaviourClient &client)
 Same thing as GoTo, but reads its parameters from the blackboard.
 
Status Botcraft::GoToDouble (BehaviourClient &client, const Vector3< double > &goal, const bool allow_jump=true, const bool sprint=true, const float speed_factor=1.0f)
 Find a path to a position and navigate to it.
 
Status Botcraft::GoToDoubleBlackboard (BehaviourClient &client)
 Same thing as GoToDouble, but reads its parameters from the blackboard.
 
Status Botcraft::LookAtImpl (BehaviourClient &client, const Vector3< double > &target, const bool set_pitch, const bool sync_to_server)
 
Status Botcraft::LookAt (BehaviourClient &client, const Vector3< double > &target, const bool set_pitch=true, const bool sync_to_server=true)
 Turn the camera to look at a given target and send the new rotation to the server.
 
Status Botcraft::LookAtBlackboard (BehaviourClient &client)
 Same thing as LookAt, but reads its parameters from the blackboard.
 
Status Botcraft::StartFlying (BehaviourClient &client)
 Make the current player fly (as in creative/spectator mode, NOT WITH ELYTRA)
 
Status Botcraft::StopFlying (BehaviourClient &client)
 Make the current player not fly (as in creative/spectator mode, NOT WITH ELYTRA)
 
Status Botcraft::SyncPosRotToServer (BehaviourClient &client)
 This task will make sure the current player position/orientation have been sent to the server This is important for example if you want to throw an item: you need to first look in the desired direction then throw the item.
 

Variables

static const std::string Botcraft::botcraft_pathfinding_speed_key = "botcraft:speed"