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