Botcraft 1.21.4
Loading...
Searching...
No Matches
EntitiesTasks.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace Botcraft
7{
8 class BehaviourClient;
9
10 /// @brief Interact with a given entity. If too far, will try to pathfind to it.
11 /// @param client The client performing the action
12 /// @param entity_id The ID of the entity we want to interact with
13 /// @param hand The hand we want to use
14 /// @param swing If true, a swing packet will be sent too
15 /// @return Success if the entity is right clicked (does not mean the server accepted it though). Failure otherwise.
16 Status InteractEntity(BehaviourClient& client, const int entity_id, const Hand hand = Hand::Main, const bool swing = false);
17
18 /// @brief Same thing as InteractEntity, but reads its parameters from the blackboard
19 /// @param client The client performing the action
20 /// @return Success if the entity is right clicked (does not mean the server accepted it though). Failure otherwise.
21 Status InteractEntityBlackboard(BehaviourClient& client);
22}
Status InteractEntity(BehaviourClient &client, const int entity_id, const Hand hand=Hand::Main, const bool swing=false)
Interact with a given entity.
Status InteractEntityBlackboard(BehaviourClient &client)
Same thing as InteractEntity, but reads its parameters from the blackboard.