Botcraft 1.21.4
Loading...
Searching...
No Matches
DigTask.hpp
Go to the documentation of this file.
1#pragma once
2
6
7namespace Botcraft
8{
9 class BehaviourClient;
10
11 /// @brief Dig a block at a given location. If too far, will try to pathfind toward it
12 /// @param c The client performing the action
13 /// @param pos Location of block to dig
14 /// @param send_swing If true, will send swing packets to show other players digging in progress
15 /// @param face Digging direction
16 /// @param allow_pathfinding If true, the bot will try to pathfind toward the block if it's too far. If false the task will return Failure instead in this case.
17 /// @return Success if the block is broken, Failure otherwise
18 Status Dig(BehaviourClient& c, const Position& pos, const bool send_swing = false, const PlayerDiggingFace face = PlayerDiggingFace::Up, const bool allow_pathfinding = true);
19
20 /// @brief Same thing as Dig, but reads its parameters from the blackboard
21 /// @param c The client performing the action
22 /// @return Success if the block is broken, Failure otherwise
23 Status DigBlackboard(BehaviourClient& c);
24}
Vector3< int > Position
Definition Vector3.hpp:282
Direction PlayerDiggingFace
Definition Enums.hpp:211
Status Dig(BehaviourClient &c, const Position &pos, const bool send_swing=false, const PlayerDiggingFace face=PlayerDiggingFace::Up, const bool allow_pathfinding=true)
Dig a block at a given location.
Definition DigTask.cpp:259
Status DigBlackboard(BehaviourClient &c)
Same thing as Dig, but reads its parameters from the blackboard.
Definition DigTask.cpp:278