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