LeviLamina
Loading...
Searching...
No Matches
NewExecuteCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
7#include "mc/server/commands/Command.h"
8#include "mc/server/commands/CommandBlockName.h"
9#include "mc/server/commands/CommandChainedSubcommand.h"
10#include "mc/server/commands/CommandCompareOperator.h"
11#include "mc/server/commands/CommandIntegerRange.h"
12#include "mc/server/commands/CommandPosition.h"
13#include "mc/server/commands/CommandPositionFloat.h"
14#include "mc/server/commands/CommandSelector.h"
15#include "mc/server/commands/RelativeFloat.h"
16
17// auto generated forward declare list
18// clang-format off
19class Actor;
21class CommandOrigin;
22class CommandOutput;
23class CommandRegistry;
24class Scoreboard;
25struct ScoreInfo;
26struct ScoreboardId;
27// clang-format on
28
29class NewExecuteCommand : public ::Command {
30public:
31 // NewExecuteCommand inner types declare
32 // clang-format off
34 // clang-format on
35
36 // NewExecuteCommand inner types define
38 public:
39 // ExecuteChainedSubcommand inner types define
40 enum class ConditionSubcommand : int {
41 None = 0,
42 Block = 1,
43 Blocks = 2,
44 Entity = 3,
45 Score = 4,
46 };
47
48 enum class ScanMode : int {
49 All = 0,
50 Masked = 1,
51 };
52
53 enum class ScoreRangeMode : int {
54 Off = 0,
55 On = 1,
56 };
57
58 enum class Subcommand : int {
59 None = 0,
60 As = 1,
61 At = 2,
62 In = 3,
63 Positioned = 4,
64 Rotated = 5,
65 Facing = 6,
66 Entity = 7,
67 Align = 8,
68 Anchored = 9,
69 If = 10,
70 Unless = 11,
71 Run = 12,
72 };
73
74 public:
75 // virtual functions
76 // NOLINTBEGIN
77 virtual ::std::string getCommandName() const /*override*/;
78 // NOLINTEND
79
80 public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static ::std::string
84 getSubcommandName(::NewExecuteCommand::ExecuteChainedSubcommand::ConditionSubcommand subcommand);
85
86 MCAPI static ::std::string
87 getSubcommandName(::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand subcommand);
88
89 MCAPI static void setup(::CommandRegistry& registry);
90 // NOLINTEND
91
92 public:
93 // static variables
94 // NOLINTBEGIN
95 MCAPI static char const*& CHAINED_OPTION_0();
96
97 MCAPI static char const*& CONDITION_SUBCOMMAND_OPTION_BLOCK();
98
99 MCAPI static char const*& CONDITION_SUBCOMMAND_OPTION_BLOCKS();
100
101 MCAPI static char const*& CONDITION_SUBCOMMAND_OPTION_ENTITY();
102
103 MCAPI static char const*& CONDITION_SUBCOMMAND_OPTION_SCORE();
104
105 MCAPI static char const*& SUBCOMMAND_ALIGN();
106
107 MCAPI static char const*& SUBCOMMAND_ANCHORED();
108
109 MCAPI static char const*& SUBCOMMAND_AS();
110
111 MCAPI static char const*& SUBCOMMAND_AT();
112
113 MCAPI static char const*& SUBCOMMAND_BLOCK();
114
115 MCAPI static char const*& SUBCOMMAND_BLOCKS();
116
117 MCAPI static char const*& SUBCOMMAND_ENTITY();
118
119 MCAPI static char const*& SUBCOMMAND_FACING();
120
121 MCAPI static char const*& SUBCOMMAND_IF();
122
123 MCAPI static char const*& SUBCOMMAND_IN();
124
125 MCAPI static char const*& SUBCOMMAND_OPTION_ALIGN();
126
127 MCAPI static char const*& SUBCOMMAND_OPTION_ANCHORED();
128
129 MCAPI static char const*& SUBCOMMAND_OPTION_AS();
130
131 MCAPI static char const*& SUBCOMMAND_OPTION_AT();
132
133 MCAPI static char const*& SUBCOMMAND_OPTION_ENTITY();
134
135 MCAPI static char const*& SUBCOMMAND_OPTION_FACING();
136
137 MCAPI static char const*& SUBCOMMAND_OPTION_IF_UNLESS();
138
139 MCAPI static char const*& SUBCOMMAND_OPTION_IN();
140
141 MCAPI static char const*& SUBCOMMAND_OPTION_POSITIONED();
142
143 MCAPI static char const*& SUBCOMMAND_OPTION_ROTATED();
144
145 MCAPI static char const*& SUBCOMMAND_OPTION_RUN();
146
147 MCAPI static char const*& SUBCOMMAND_POSITIONED();
148
149 MCAPI static char const*& SUBCOMMAND_ROTATED();
150
151 MCAPI static char const*& SUBCOMMAND_RUN();
152
153 MCAPI static char const*& SUBCOMMAND_SCORE();
154
155 MCAPI static char const*& SUBCOMMAND_UNLESS();
156 // NOLINTEND
157
158 public:
159 // virtual function thunks
160 // NOLINTBEGIN
161 MCAPI ::std::string $getCommandName() const;
162
163
164 // NOLINTEND
165
166 public:
167 // vftables
168 // NOLINTBEGIN
169 MCNAPI static void** $vftable();
170 // NOLINTEND
171 };
172
173public:
174 // member variables
175 // NOLINTBEGIN
176 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand> mSubcommandOption;
177 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand> mSecondarySubcommandOption;
178 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ConditionSubcommand>
179 mConditionSubcommandOption;
180 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargets;
181 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mSources;
182 ::ll::TypedStorage<8, 32, ::std::string> mAxesAlignment;
183 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::ActorLocation> mActorLocation;
184 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mPosition;
185 ::ll::TypedStorage<4, 16, ::CommandPosition> mBlockPosition;
186 ::ll::TypedStorage<4, 16, ::CommandPosition> mEndPosition;
187 ::ll::TypedStorage<4, 16, ::CommandPosition> mDestination;
188 ::ll::TypedStorage<4, 8, ::RelativeFloat> mRotationX;
189 ::ll::TypedStorage<4, 8, ::RelativeFloat> mRotationY;
190 ::ll::TypedStorage<4, 4, ::DimensionType> mTargetDimension;
191 ::ll::TypedStorage<8, 8, ::CommandBlockName> mBlock;
192 ::ll::TypedStorage<8, 24, ::std::vector<::BlockStateCommandParam>> mBlockStates;
193 ::ll::TypedStorage<4, 4, int> mBlockData;
194 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ScanMode> mScanMode;
195 ::ll::TypedStorage<8, 32, ::std::string> mTargetScoreObjective;
196 ::ll::TypedStorage<8, 32, ::std::string> mSourceScoreObjective;
197 ::ll::TypedStorage<1, 1, ::CommandCompareOperator> mCompareOperator;
198 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ScoreRangeMode> mRangeMode;
199 ::ll::TypedStorage<4, 12, ::CommandIntegerRange> mRange;
200 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Command>> mCommand;
201 ::ll::TypedStorage<8, 16, ::NewExecuteCommand::ExecuteChainedSubcommand> mChainedCommand;
202 // NOLINTEND
203
204public:
205 // virtual functions
206 // NOLINTBEGIN
207 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
208 // NOLINTEND
209
210public:
211 // member functions
212 // NOLINTBEGIN
213 MCAPI NewExecuteCommand();
214
215 MCAPI void _commandOutputFail(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
216
217 MCAPI void _commandOutputSuccess(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
218
219 MCAPI bool _detectConditionSubcommand(
220 ::CommandOrigin const& origin,
221 ::CommandOutput& output,
222 ::std::optional<int>& testPassCount
223 ) const;
224
225 MCAPI ::std::optional<::ScoreInfo> _getScoreFromSelectorOnObjective(
226 ::Scoreboard const& scoreboard,
227 ::CommandSelector<::Actor> const& selector,
228 ::std::string const& objectiveName,
229 ::CommandOrigin const& origin,
230 ::CommandOutput& output
231 ) const;
232
233 MCAPI ::std::optional<::ScoreboardId> _getScoreboardIdForSelector(
234 ::Scoreboard const& scoreboard,
235 ::CommandSelector<::Actor> const& selector,
236 ::CommandOrigin const& origin,
237 ::CommandOutput& output
238 ) const;
239 // NOLINTEND
240
241public:
242 // static functions
243 // NOLINTBEGIN
244 MCAPI static void setup(::CommandRegistry& registry, int newExecuteStartVersion);
245 // NOLINTEND
246
247public:
248 // constructor thunks
249 // NOLINTBEGIN
250 MCAPI void* $ctor();
251 // NOLINTEND
252
253public:
254 // virtual function thunks
255 // NOLINTBEGIN
256 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
257
258
259 // NOLINTEND
260
261public:
262 // vftables
263 // NOLINTBEGIN
264 MCNAPI static void** $vftable();
265 // NOLINTEND
266};
Definition Actor.h:123
Definition BlockStateCommandParam.h:16
Definition Block.h:69
Definition CommandChainedSubcommand.h:10
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition CommandSelector.h:11
Definition NewExecuteCommand.h:37
static MCAPI void ** $vftable()
Definition Scoreboard.h:35
Definition ScoreInfo.h:10
Definition ScoreboardId.h:11