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
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 MCNAPI static ::std::string
90 getSubcommandName(::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand subcommand);
91
92 MCNAPI static void setup(::CommandRegistry& registry);
93 // NOLINTEND
94
95 public:
96 // static variables
97 // NOLINTBEGIN
98 MCNAPI static char const*& CHAINED_OPTION_0();
99
100 MCNAPI static char const*& CONDITION_SUBCOMMAND_OPTION_BLOCK();
101
102 MCNAPI static char const*& CONDITION_SUBCOMMAND_OPTION_BLOCKS();
103
104 MCNAPI static char const*& CONDITION_SUBCOMMAND_OPTION_ENTITY();
105
106 MCNAPI static char const*& CONDITION_SUBCOMMAND_OPTION_SCORE();
107
108 MCNAPI static char const*& SUBCOMMAND_ALIGN();
109
110 MCNAPI static char const*& SUBCOMMAND_ANCHORED();
111
112 MCNAPI static char const*& SUBCOMMAND_AS();
113
114 MCNAPI static char const*& SUBCOMMAND_AT();
115
116 MCNAPI static char const*& SUBCOMMAND_BLOCK();
117
118 MCNAPI static char const*& SUBCOMMAND_BLOCKS();
119
120 MCNAPI static char const*& SUBCOMMAND_ENTITY();
121
122 MCNAPI static char const*& SUBCOMMAND_FACING();
123
124 MCNAPI static char const*& SUBCOMMAND_IF();
125
126 MCNAPI static char const*& SUBCOMMAND_IN();
127
128 MCNAPI static char const*& SUBCOMMAND_OPTION_ALIGN();
129
130 MCNAPI static char const*& SUBCOMMAND_OPTION_ANCHORED();
131
132 MCNAPI static char const*& SUBCOMMAND_OPTION_AS();
133
134 MCNAPI static char const*& SUBCOMMAND_OPTION_AT();
135
136 MCNAPI static char const*& SUBCOMMAND_OPTION_ENTITY();
137
138 MCNAPI static char const*& SUBCOMMAND_OPTION_FACING();
139
140 MCNAPI static char const*& SUBCOMMAND_OPTION_IF_UNLESS();
141
142 MCNAPI static char const*& SUBCOMMAND_OPTION_IN();
143
144 MCNAPI static char const*& SUBCOMMAND_OPTION_POSITIONED();
145
146 MCNAPI static char const*& SUBCOMMAND_OPTION_ROTATED();
147
148 MCNAPI static char const*& SUBCOMMAND_OPTION_RUN();
149
150 MCNAPI static char const*& SUBCOMMAND_POSITIONED();
151
152 MCNAPI static char const*& SUBCOMMAND_ROTATED();
153
154 MCNAPI static char const*& SUBCOMMAND_RUN();
155
156 MCNAPI static char const*& SUBCOMMAND_SCORE();
157
158 MCNAPI static char const*& SUBCOMMAND_UNLESS();
159 // NOLINTEND
160
161 public:
162 // virtual function thunks
163 // NOLINTBEGIN
164 MCNAPI ::std::string $getCommandName() const;
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 // vIndex: 2
209 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
210
211 // vIndex: 0
212 virtual ~NewExecuteCommand() /*override*/;
213 // NOLINTEND
214
215public:
216 // member functions
217 // NOLINTBEGIN
218 MCAPI NewExecuteCommand();
219
220 MCAPI void _commandOutputFail(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
221
222 MCAPI void _commandOutputSuccess(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
223
224 MCAPI bool _detectConditionSubcommand(
225 ::CommandOrigin const& origin,
226 ::CommandOutput& output,
227 ::std::optional<int>& testPassCount
228 ) const;
229
230 MCAPI ::std::optional<::ScoreInfo> _getScoreFromSelectorOnObjective(
231 ::Scoreboard const& scoreboard,
232 ::CommandSelector<::Actor> const& selector,
233 ::std::string const& objectiveName,
234 ::CommandOrigin const& origin,
235 ::CommandOutput& output
236 ) const;
237
238 MCAPI ::std::optional<::ScoreboardId> _getScoreboardIdForSelector(
239 ::Scoreboard const& scoreboard,
240 ::CommandSelector<::Actor> const& selector,
241 ::CommandOrigin const& origin,
242 ::CommandOutput& output
243 ) const;
244 // NOLINTEND
245
246public:
247 // static functions
248 // NOLINTBEGIN
249 MCAPI static void setup(::CommandRegistry& registry, int newExecuteStartVersion);
250 // NOLINTEND
251
252public:
253 // constructor thunks
254 // NOLINTBEGIN
255 MCAPI void* $ctor();
256 // NOLINTEND
257
258public:
259 // destructor thunk
260 // NOLINTBEGIN
261 MCAPI void $dtor();
262 // NOLINTEND
263
264public:
265 // virtual function thunks
266 // NOLINTBEGIN
267 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
268 // NOLINTEND
269
270public:
271 // vftables
272 // NOLINTBEGIN
273 MCNAPI static void** $vftable();
274 // NOLINTEND
275};
Definition Actor.h:103
Definition BlockStateCommandParam.h:16
Definition Block.h:38
Definition CommandChainedSubcommand.h:10
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:45
Definition CommandSelector.h:11
Definition Command.h:17
Definition Dimension.h:83
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()
Definition NewExecuteCommand.h:31
static MCAPI void ** $vftable()
Definition Scoreboard.h:32
Definition ScoreInfo.h:10
Definition ScoreboardId.h:10