LeviLamina
Loading...
Searching...
No Matches
AgentCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/Command.h"
7#include "mc/server/commands/CommandItem.h"
8#include "mc/server/commands/CommandPosition.h"
9#include "mc/world/actor/agent/agent_components/CollectionSpecification.h"
10#include "mc/world/actor/agent/agent_components/Direction.h"
11
12// auto generated forward declare list
13// clang-format off
14class CommandOrigin;
15class CommandOutput;
16class CommandRegistry;
17class Player;
18namespace AgentCommands { class Command; }
19// clang-format on
20
21class AgentCommand : public ::Command {
22public:
23 // AgentCommand inner types declare
24 // clang-format off
25 struct CommandInfo;
26 // clang-format on
27
28 // AgentCommand inner types define
29 enum class FacingResult : int {
30 HaveFacing = 0,
31 NoFacing = 1,
32 Error = 2,
33 };
34
35 enum class Mode : int {
36 Attack = 0,
37 Collect = 1,
38 Create = 2,
39 Detect = 3,
40 DetectRedstone = 4,
41 Drop = 5,
42 DropAll = 6,
43 GetItemCount = 7,
44 GetItemDetail = 8,
45 GetItemSpace = 9,
46 GetPosition = 10,
47 InspectData = 11,
48 Move = 12,
49 Place = 13,
50 SetItem = 14,
51 Till = 15,
52 Tp = 16,
53 Transfer = 17,
54 Turn = 18,
55 };
56
57 struct CommandInfo {};
58
59 using AgentCommandFunction = ::std::function<::std::unique_ptr<::AgentCommands::Command>(::Player&)>;
60
61 using AgentCommandReturnType = ::std::unique_ptr<::AgentCommands::Command>;
62
63public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<4, 4, ::AgentCommand::Mode> mMode;
67 ::ll::TypedStorage<1, 1, ::AgentComponents::CollectionSpecification> mCollectMode;
68 ::ll::TypedStorage<1, 1, ::AgentComponents::Direction> mDirection;
69 ::ll::TypedStorage<8, 8, ::CommandItem> mItem;
70 ::ll::TypedStorage<4, 4, int> mSlot;
71 ::ll::TypedStorage<4, 4, int> mDestination;
72 ::ll::TypedStorage<4, 4, int> mQuantity;
73 ::ll::TypedStorage<4, 4, int> mAux;
74 ::ll::TypedStorage<4, 16, ::CommandPosition> mPos;
75 ::ll::TypedStorage<4, 16, ::CommandPosition> mFacing;
76 ::ll::TypedStorage<1, 1, bool> mIsPosSet;
77 ::ll::TypedStorage<4, 4, ::AgentCommand::FacingResult> mHaveFacing;
78 ::ll::TypedStorage<4, 4, float> mYRot;
79 ::ll::TypedStorage<1, 1, bool> mIsYRotSet;
80 // NOLINTEND
81
82public:
83 // virtual functions
84 // NOLINTBEGIN
85 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
91 MCAPI void collect(::CommandOrigin const& origin, ::CommandOutput& output) const;
92
93 MCAPI void createAgent(::Player& player, ::CommandOrigin const& origin, ::CommandOutput& output) const;
94
95 MCAPI void directionCommand(::CommandOrigin const& origin, ::CommandOutput& output) const;
96
97 MCAPI void drop(::CommandOrigin const& origin, ::CommandOutput& output) const;
98
99 MCAPI ::std::string errorName() const;
100
101 MCAPI void getPosition(::CommandOrigin const& origin, ::CommandOutput& output) const;
102
103 MCAPI void itemCommand(::CommandOrigin const& origin, ::CommandOutput& output) const;
104
105 MCAPI void place(::CommandOrigin const& origin, ::CommandOutput& output) const;
106
107 MCAPI void reportSuccess(bool success, ::CommandOutput& output) const;
108
109 MCAPI void setItem(::CommandOrigin const& origin, ::CommandOutput& output) const;
110
111 MCAPI ::std::string successName() const;
112
113 MCAPI void tpAgent(::Player& player, ::CommandOrigin const& origin, ::CommandOutput& output) const;
114
115 MCAPI void transfer(::CommandOrigin const& origin, ::CommandOutput& output) const;
116 // NOLINTEND
117
118public:
119 // static functions
120 // NOLINTBEGIN
121 MCAPI static void setup(::CommandRegistry& registry);
122 // NOLINTEND
123
124public:
125 // virtual function thunks
126 // NOLINTBEGIN
127 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
128
129
130 // NOLINTEND
131
132public:
133 // vftables
134 // NOLINTBEGIN
135 MCNAPI static void** $vftable();
136 // NOLINTEND
137};
138
139// clang-format off
140template <>
141MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::AgentCommand::FacingResult>();
142template <>
143MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::AgentCommand::Mode>();
144// clang-format on
Definition AgentCommand.h:21
static MCAPI void ** $vftable()
Definition Command.h:16
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition Player.h:137
Definition AgentCommand.h:57