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 MCAPI static ::std::string
88 getSubcommandName(::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand subcommand);
89
90 MCAPI static void setup(::CommandRegistry& registry);
91 // NOLINTEND
92
93 public:
94 // static variables
95 // NOLINTBEGIN
96 MCAPI static char const*& SUBCOMMAND_ALIGN();
97
98 MCAPI static char const*& SUBCOMMAND_ANCHORED();
99
100 MCAPI static char const*& SUBCOMMAND_AS();
101
102 MCAPI static char const*& SUBCOMMAND_AT();
103
104 MCAPI static char const*& SUBCOMMAND_BLOCK();
105
106 MCAPI static char const*& SUBCOMMAND_BLOCKS();
107
108 MCAPI static char const*& SUBCOMMAND_ENTITY();
109
110 MCAPI static char const*& SUBCOMMAND_FACING();
111
112 MCAPI static char const*& SUBCOMMAND_IF();
113
114 MCAPI static char const*& SUBCOMMAND_IN();
115
116 MCAPI static char const*& SUBCOMMAND_POSITIONED();
117
118 MCAPI static char const*& SUBCOMMAND_ROTATED();
119
120 MCAPI static char const*& SUBCOMMAND_RUN();
121
122 MCAPI static char const*& SUBCOMMAND_SCORE();
123
124 MCAPI static char const*& SUBCOMMAND_UNLESS();
125 // NOLINTEND
126
127 public:
128 // virtual function thunks
129 // NOLINTBEGIN
130 MCAPI ::std::string $getCommandName() const;
131
132
133 // NOLINTEND
134
135 public:
136 // vftables
137 // NOLINTBEGIN
138 MCNAPI static void** $vftable();
139 // NOLINTEND
140 };
141
142public:
143 // member variables
144 // NOLINTBEGIN
145 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand> mSubcommandOption;
146 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::Subcommand> mSecondarySubcommandOption;
147 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ConditionSubcommand>
148 mConditionSubcommandOption;
149 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargets;
150 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mSources;
151 ::ll::TypedStorage<8, 32, ::std::string> mAxesAlignment;
152 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::ActorLocation> mActorLocation;
153 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mPosition;
154 ::ll::TypedStorage<4, 16, ::CommandPosition> mBlockPosition;
155 ::ll::TypedStorage<4, 16, ::CommandPosition> mEndPosition;
156 ::ll::TypedStorage<4, 16, ::CommandPosition> mDestination;
157 ::ll::TypedStorage<4, 8, ::RelativeFloat> mRotationX;
158 ::ll::TypedStorage<4, 8, ::RelativeFloat> mRotationY;
159 ::ll::TypedStorage<4, 4, ::DimensionType> mTargetDimension;
160 ::ll::TypedStorage<8, 8, ::CommandBlockName> mBlock;
161 ::ll::TypedStorage<8, 24, ::std::vector<::BlockStateCommandParam>> mBlockStates;
162 ::ll::TypedStorage<4, 4, int> mBlockData;
163 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ScanMode> mScanMode;
164 ::ll::TypedStorage<8, 32, ::std::string> mTargetScoreObjective;
165 ::ll::TypedStorage<8, 32, ::std::string> mSourceScoreObjective;
166 ::ll::TypedStorage<1, 1, ::CommandCompareOperator> mCompareOperator;
167 ::ll::TypedStorage<4, 4, ::NewExecuteCommand::ExecuteChainedSubcommand::ScoreRangeMode> mRangeMode;
168 ::ll::TypedStorage<4, 12, ::CommandIntegerRange> mRange;
169 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Command>> mCommand;
170 ::ll::TypedStorage<8, 16, ::NewExecuteCommand::ExecuteChainedSubcommand> mChainedCommand;
171 // NOLINTEND
172
173public:
174 // virtual functions
175 // NOLINTBEGIN
176 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
177
178 virtual ~NewExecuteCommand() /*override*/;
179 // NOLINTEND
180
181public:
182 // member functions
183 // NOLINTBEGIN
184 MCAPI NewExecuteCommand();
185
186 MCAPI void _commandOutputFail(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
187
188 MCAPI void _commandOutputSuccess(::CommandOutput& output, ::std::optional<int> const& testPassCount) const;
189
190 MCAPI bool _detectConditionSubcommand(
191 ::CommandOrigin const& origin,
192 ::CommandOutput& output,
193 ::std::optional<int>& testPassCount
194 ) const;
195
196 MCAPI ::std::optional<::ScoreInfo> _getScoreFromSelectorOnObjective(
197 ::Scoreboard const& scoreboard,
198 ::CommandSelector<::Actor> const& selector,
199 ::std::string const& objectiveName,
200 ::CommandOrigin const& origin,
201 ::CommandOutput& output
202 ) const;
203
204 MCAPI ::std::optional<::ScoreboardId> _getScoreboardIdForSelector(
205 ::Scoreboard const& scoreboard,
206 ::CommandSelector<::Actor> const& selector,
207 ::CommandOrigin const& origin,
208 ::CommandOutput& output
209 ) const;
210 // NOLINTEND
211
212public:
213 // static functions
214 // NOLINTBEGIN
215 MCAPI static void setup(::CommandRegistry& registry, int newExecuteStartVersion);
216 // NOLINTEND
217
218public:
219 // constructor thunks
220 // NOLINTBEGIN
221 MCAPI void* $ctor();
222 // NOLINTEND
223
224public:
225 // destructor thunk
226 // NOLINTBEGIN
227 MCAPI void $dtor();
228 // NOLINTEND
229
230public:
231 // virtual function thunks
232 // NOLINTBEGIN
233 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
234
235
236 // NOLINTEND
237
238public:
239 // vftables
240 // NOLINTBEGIN
241 MCNAPI static void** $vftable();
242 // NOLINTEND
243};
Definition Actor.h:106
Definition BlockStateCommandParam.h:16
Definition Block.h:43
Definition CommandChainedSubcommand.h:10
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:50
Definition CommandSelector.h:11
Definition Command.h:17
Definition Dimension.h:86
Definition NewExecuteCommand.h:39
static MCAPI void ** $vftable()
Definition Scoreboard.h:34
Definition ScoreInfo.h:10
Definition ScoreboardId.h:11