LeviLamina
Loading...
Searching...
No Matches
CommandRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/network/packet/AvailableCommandsPacket.h"
5#include "mc/server/commands/BlockStateCommandParam.h"
6#include "mc/server/commands/CommandChainedSubcommand.h"
7#include "mc/server/commands/CommandCompareOperator.h"
8#include "mc/server/commands/CommandFilePath.h"
9#include "mc/server/commands/CommandFlag.h"
10#include "mc/server/commands/CommandMessage.h"
11#include "mc/server/commands/CommandOperator.h"
12#include "mc/server/commands/CommandRawText.h"
13#include "mc/server/commands/CommandVersion.h"
14#include "mc/server/commands/CommandWildcardInt.h"
15#include "mc/server/commands/WildcardCommandSelector.h"
16
17// auto generated inclusion list
18#include "mc/deps/core/utility/typeid_t.h"
19#include "mc/platform/brstd/copyable_function.h"
20#include "mc/server/commands/CommandFlag.h"
21#include "mc/server/commands/CommandLexer.h"
22#include "mc/server/commands/CommandPermissionLevel.h"
23#include "mc/server/commands/CommandSelector.h"
24#include "mc/server/commands/CommandStatus.h"
25#include "mc/server/commands/CommandTypeFlag.h"
26#include "mc/server/commands/CommandVersion.h"
27#include "mc/server/commands/SemanticConstraint.h"
28#include "mc/world/actor/selectors/InvertableFilter.h"
29
30// auto generated forward declare list
31// clang-format off
32class Actor;
34class BlockType;
35class Command;
36class CommandOrigin;
38class CommandRunStats;
41class Packet;
42class PlayerListEntry;
47namespace Json { class Value; }
48namespace mce { class UUID; }
49// clang-format on
50
51class CommandRegistry {
52public:
53 // CommandRegistry inner types declare
54 // clang-format off
55 struct RegistryState;
56 struct SoftEnum;
57 class Symbol;
58 struct ConstrainedValue;
59 struct Factorization;
60 struct LexicalToken;
62 struct Overload;
63 struct ParamSymbols;
64 struct ParseToken;
65 struct ChainedSubcommand;
66 struct Enum;
67 struct ParamParseRule;
68 struct ParseRule;
69 struct SemanticInfo;
70 struct SymbolHasher;
71 struct SymbolPairHasher;
72 struct ParseTable;
73 struct Signature;
74 class Parser;
75 // clang-format on
76
77 // CommandRegistry inner types define
78
79 using ParseFunction = bool (::CommandRegistry::*)(
80 void*,
82 ::CommandOrigin const&,
83 int,
84 ::std::string&,
85 ::std::vector<::std::string>&
86 ) const;
87
88 enum class HardNonTerminal : int {
89 Epsilon = 1048576,
90 Int = 1048577,
91 Float = 1048578,
92 Val = 1048579,
93 RVal = 1048580,
94 WildcardInt = 1048581,
95 Operator = 1048582,
96 CompareOperator = 1048583,
97 Selection = 1048584,
98 StandaloneSelection = 1048585,
99 WildcardSelection = 1048586,
100 NonIdSelector = 1048587,
101 ScoresArg = 1048588,
102 ScoresArgs = 1048589,
103 ScoreSelectParam = 1048590,
104 ScoreSelector = 1048591,
105 TagSelector = 1048592,
106 FilePath = 1048593,
107 FilePathVal = 1048594,
108 FilePathCont = 1048595,
109 IntegerRangeVal = 1048596,
110 IntegerRangePostVal = 1048597,
111 IntegerRange = 1048598,
112 FullIntegerRange = 1048599,
113 RationalRangeVal = 1048600,
114 RationalRangePostVal = 1048601,
115 RationalRange = 1048602,
116 FullRationalRange = 1048603,
117 SelArgs = 1048604,
118 Args = 1048605,
119 Arg = 1048606,
120 MArg = 1048607,
121 MValue = 1048608,
122 NameArg = 1048609,
123 TypeArg = 1048610,
124 FamilyArg = 1048611,
125 HasPermissionArg = 1048612,
126 HasPermissionArgs = 1048613,
127 HasPermissionSelector = 1048614,
128 HasPermissionElement = 1048615,
129 HasPermissionElements = 1048616,
130 TagArg = 1048617,
131 HasItemElement = 1048618,
132 HasItemElements = 1048619,
133 HasItemArg = 1048620,
134 HasItemArgs = 1048621,
135 HasItemSelector = 1048622,
136 EquipmentSlotEnum = 1048623,
137 PropertyValue = 1048624,
138 HasPropertyParamValue = 1048625,
139 HasPropertyParamEnumValue = 1048626,
140 HasPropertyArg = 1048627,
141 HasPropertyArgs = 1048628,
142 HasPropertyElement = 1048629,
143 HasPropertyElements = 1048630,
144 HasPropertySelector = 1048631,
145 Id = 1048632,
146 IdCont = 1048633,
147 CoordXInt = 1048634,
148 CoordYInt = 1048635,
149 CoordZInt = 1048636,
150 CoordXFloat = 1048637,
151 CoordYFloat = 1048638,
152 CoordZFloat = 1048639,
153 Position = 1048640,
154 PositionFloat = 1048641,
155 MessageExp = 1048642,
156 Message = 1048643,
157 MessageRoot = 1048644,
158 PostSelector = 1048645,
159 RawText = 1048646,
160 RawTextCont = 1048647,
161 JsonValue = 1048648,
162 JsonField = 1048649,
163 JsonObject = 1048650,
164 JsonObjectFields = 1048651,
165 JsonObjectCont = 1048652,
166 JsonArray = 1048653,
167 JsonArrayValues = 1048654,
168 JsonArrayCont = 1048655,
169 BlockState = 1048656,
170 BlockStateKey = 1048657,
171 BlockStateValue = 1048658,
172 BlockStateValues = 1048659,
173 BlockStateArray = 1048660,
174 BlockStateArrayCont = 1048661,
175 ClockTimeMarkerName = 1048662,
176 Command = 1048663,
177 SlashCommand = 1048664,
178 CodeBuilderArg = 1048665,
179 CodeBuilderArgs = 1048666,
180 CodeBuilderSelectParam = 1048667,
181 CodeBuilderSelector = 1048668,
182 };
183
184 struct RegistryState {
185 public:
186 // member variables
187 // NOLINTBEGIN
188 ::ll::TypedStorage<4, 4, uint> signatureCount;
189 ::ll::TypedStorage<4, 4, uint> enumValueCount;
190 ::ll::TypedStorage<4, 4, uint> postfixCount;
191 ::ll::TypedStorage<4, 4, uint> enumCount;
192 ::ll::TypedStorage<4, 4, uint> enumLookupCount;
193 ::ll::TypedStorage<4, 4, uint> typeLookupCount;
194 ::ll::TypedStorage<4, 4, uint> factorizationCount;
195 ::ll::TypedStorage<4, 4, uint> optionalCount;
196 ::ll::TypedStorage<4, 4, uint> ruleCount;
197 ::ll::TypedStorage<4, 4, uint> softEnumCount;
198 ::ll::TypedStorage<4, 4, uint> constraintCount;
199 ::ll::TypedStorage<4, 4, uint> chainedSubcommandCount;
200 ::ll::TypedStorage<4, 4, uint> chainedSubcommandValueCount;
201 ::ll::TypedStorage<8, 24, ::std::vector<uint>> enumValuesCount;
202 ::ll::TypedStorage<8, 24, ::std::vector<uint>> constrainedValueCount;
203 ::ll::TypedStorage<8, 24, ::std::vector<uint>> softEnumValuesCount;
204 // NOLINTEND
205
206#ifdef LL_PLAT_S
207#else // LL_PLAT_C
208 public:
209 // prevent constructor by default
210 RegistryState& operator=(RegistryState const&);
211 RegistryState();
212
213#endif
214 public:
215 // member functions
216 // NOLINTBEGIN
217#ifdef LL_PLAT_C
218 MCAPI RegistryState(::CommandRegistry::RegistryState const&);
219#endif
220
221 MCAPI ~RegistryState();
222 // NOLINTEND
223
224 public:
225 // constructor thunks
226 // NOLINTBEGIN
227#ifdef LL_PLAT_C
228 MCAPI void* $ctor(::CommandRegistry::RegistryState const&);
229#endif
230 // NOLINTEND
231
232 public:
233 // destructor thunk
234 // NOLINTBEGIN
235 MCAPI void $dtor();
236 // NOLINTEND
237 };
238
239 struct SoftEnum {
240 public:
241 // member variables
242 // NOLINTBEGIN
243 ::std::string mName;
244 ::std::vector<::std::string> mValues;
245 // NOLINTEND
246
247 public:
248 // prevent constructor by default
249 SoftEnum() = default;
250
251 public:
252 // member functions
253 // NOLINTBEGIN
254 MCAPI SoftEnum(::std::string const& name, ::std::vector<::std::string> values);
255 // NOLINTEND
256
257 public:
258 // constructor thunks
259 // NOLINTBEGIN
260 MCAPI void* $ctor(::std::string const& name, ::std::vector<::std::string> values);
261 // NOLINTEND
262 };
263
264 class Symbol {
265 public:
266 int mValue{-1}; // this+0x0
267
268 static int const NonTerminalBit = 0x100000;
269 static int const EnumBit = 0x200000;
270 static int const OptionalBit = 0x400000;
271 static int const FactorizationBit = 0x800000;
272 static int const PostfixBit = 0x1000000;
273 static int const EnumValueBit = 0x2000000;
274 static int const SoftEnumBit = 0x4000000;
275
276 Symbol() = default;
277
278 Symbol(int val) : mValue(val) {}
279
280 // not trivially copyable
281 Symbol(Symbol const& other) : mValue(other.mValue) {}
282
283 Symbol(HardNonTerminal data) : mValue(static_cast<int>(data)) {}
284
285 Symbol(CommandLexer::TokenType data) : mValue(static_cast<int>(data)) {}
286
287 Symbol& operator=(Symbol const& other) {
288 mValue = other.mValue;
289 return *this;
290 }
291
292 [[nodiscard]] inline bool operator==(Symbol const& other) const { return mValue == other.mValue; }
293
294 uint64 toIndex() const { return mValue & 0xffffffffe00fffffull; }
295 };
296
298 public:
299 // member variables
300 // NOLINTBEGIN
301 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> mValue;
302 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> mEnum;
303 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mConstraints;
304 // NOLINTEND
305 };
306
308 public:
309 // member variables
310 // NOLINTBEGIN
311 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> commandSymbol;
312 // NOLINTEND
313 };
314
315 struct LexicalToken {
316 public:
317 // member variables
318 // NOLINTBEGIN
319 char const* mText;
320 uint mLength;
322 ::CommandRegistry::Symbol mIdentifierInfo;
323 ::CommandRegistry const& mRegistry;
324 // NOLINTEND
325
326 public:
327 // prevent constructor by default
328 LexicalToken& operator=(LexicalToken const&);
329 LexicalToken(LexicalToken const&);
330 LexicalToken();
331
332 public:
333 // member functions
334 // NOLINTBEGIN
335 MCAPI ::CommandRegistry::LexicalToken& operator=(::CommandLexer::Token const& token);
336 // NOLINTEND
337 };
338
340 public:
341 // member variables
342 // NOLINTBEGIN
343 ::ll::TypedStorage<4, 4, int> parameterCount;
344 ::ll::TypedStorage<4, 4, int> followingRuleIndex;
345 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> paramSymbol;
346 // NOLINTEND
347 };
348
349 struct Overload {
350 public:
351 // Overload inner types define
352 using AllocFunction = ::brstd::copyable_function<::std::unique_ptr<::Command>() const>;
353
354 public:
355 // member variables
356 // NOLINTBEGIN
357 ::CommandVersion version;
358 AllocFunction alloc;
359 ::std::vector<::CommandParameterData> params;
360 int versionOffset;
361 bool isChaining;
362 ::std::vector<::CommandRegistry::Symbol> paramsSymbol;
363 // NOLINTEND
364 };
365
367 public:
368 // member variables
369 // NOLINTBEGIN
370 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> x;
371 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> y;
372 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> z;
373 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> dx;
374 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> dy;
375 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> dz;
376 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> r;
377 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> rm;
378 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> rx;
379 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> rxm;
380 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> ry;
381 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> rym;
382 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> l;
383 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> lm;
384 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> c;
385 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> m;
386 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> name;
387 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> type;
388 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> family;
389 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> score;
390 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> tag;
391 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> hasitem;
392 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> haspermission;
393 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> hasproperty;
394 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> codebuilder;
395 // NOLINTEND
396 };
397
398 struct ParseToken {
399 public:
400 // member variables
401 // NOLINTBEGIN
402 ::std::unique_ptr<::CommandRegistry::ParseToken> child;
403 ::std::unique_ptr<::CommandRegistry::ParseToken> next;
405 char const* text;
406 uint length;
408 // NOLINTEND
409
410 public:
411 // member functions
412 // NOLINTBEGIN
413 MCAPI ::std::string toString() const;
414
415 MCAPI ~ParseToken();
416 // NOLINTEND
417
418 public:
419 // destructor thunk
420 // NOLINTBEGIN
421 MCAPI void $dtor();
422 // NOLINTEND
423 };
424
426 public:
427 // member variables
428 // NOLINTBEGIN
429 ::std::string name;
431 ParseFunction parse;
432 ::std::vector<::std::pair<uint64, uint>> values;
433 // NOLINTEND
434
435 public:
436 // member functions
437 // NOLINTBEGIN
438 MCAPI ~ChainedSubcommand();
439 // NOLINTEND
440
441 public:
442 // destructor thunk
443 // NOLINTBEGIN
444 MCFOLD void $dtor();
445 // NOLINTEND
446 };
447
448 struct Enum {
449 public:
450 // member variables
451 // NOLINTBEGIN
452 ::std::string name;
454 ParseFunction parse;
455 ::std::vector<::std::pair<uint64, uint64>> values;
456 // NOLINTEND
457
458 public:
459 // member functions
460 // NOLINTBEGIN
461 MCAPI ~Enum();
462 // NOLINTEND
463
464 public:
465 // destructor thunk
466 // NOLINTBEGIN
467 MCFOLD void $dtor();
468 // NOLINTEND
469 };
470
472 public:
473 // member variables
474 // NOLINTBEGIN
475 ::ll::TypedStorage<
476 8,
477 8,
478 bool (CommandRegistry::*)(
479 void*,
481 ::CommandOrigin const&,
482 int,
483 ::std::string&,
484 ::std::vector<::std::string>&
485 ) const>
486 parse;
487 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> symbol;
488 // NOLINTEND
489 };
490
491 struct ParseRule {
492 public:
493 // member variables
494 // NOLINTBEGIN
495 ::ll::TypedStorage<4, 4, ::CommandRegistry::Symbol> nonTerminal;
496 ::ll::TypedStorage<
497 8,
498 64,
500 process;
501 ::ll::TypedStorage<8, 24, ::std::vector<::CommandRegistry::Symbol>> derivation;
502 ::ll::TypedStorage<4, 8, ::CommandVersion> versions;
503 // NOLINTEND
504
505 public:
506 // prevent constructor by default
507 ParseRule& operator=(ParseRule const&);
508 ParseRule(ParseRule const&);
509 ParseRule();
510
511 public:
512 // member functions
513 // NOLINTBEGIN
514 MCAPI ::CommandRegistry::ParseRule& operator=(::CommandRegistry::ParseRule&& rhs);
515 // NOLINTEND
516 };
517
519 public:
520 // member variables
521 // NOLINTBEGIN
522 ::ll::TypedStorage<1, 1, bool> mIsValid;
523 ::ll::TypedStorage<8, 24, ::std::vector<::CommandRegistry::Symbol>> mConstrainedParams;
524 ::ll::TypedStorage<8, 32, ::std::string> mSoftEnumText;
525 ::ll::TypedStorage<8, 32, ::std::string> mSoftEnumEscapeCharExceptions;
526 ::ll::TypedStorage<8, 16, ::std::set<::CommandRegistry::Symbol>> mAlreadyCompletedSymbols;
527 // NOLINTEND
528
529 public:
530 // member functions
531 // NOLINTBEGIN
532#ifdef LL_PLAT_C
533 MCAPI ~SemanticInfo();
534#endif
535 // NOLINTEND
536
537 public:
538 // destructor thunk
539 // NOLINTBEGIN
540#ifdef LL_PLAT_C
541 MCAPI void $dtor();
542#endif
543 // NOLINTEND
544 };
545
546 struct SymbolHasher {};
547
549
550 struct ParseTable {
551 public:
552 // member variables
553 // NOLINTBEGI
554 ::std::map<
556 ::entt::dense_set<::CommandRegistry::Symbol, ::CommandRegistry::SymbolHasher, ::std::equal_to<void>>>
557 first;
558
559 ::std::map<
561 ::entt::dense_set<::CommandRegistry::Symbol, ::CommandRegistry::SymbolHasher, ::std::equal_to<void>>>
562 follow;
563
564 ::entt::dense_map<
565 ::std::pair<::CommandRegistry::Symbol, ::CommandRegistry::Symbol>,
566 int,
568 ::std::equal_to<void>>
569 predict;
570 ::std::chrono::nanoseconds buildDuration;
571 // NOLINTEND
572
573 public:
574 // member functions
575 // NOLINTBEGIN
576 MCAPI ParseTable();
577 // NOLINTEND
578
579 public:
580 // constructor thunks
581 // NOLINTBEGIN
582 MCAPI void* $ctor();
583 // NOLINTEND
584 };
585
586 struct Signature {
587 public:
588 // member variables
589 // NOLINTBEGIN
590 ::std::string name;
591 ::std::string description;
592 ::std::vector<::CommandRegistry::Overload> overloads;
593 ::std::vector<uint> chainedSubcommandIndexes;
594 ::CommandPermissionLevel permissionLevel;
595 ::CommandRegistry::Symbol commandSymbol;
596 ::CommandRegistry::Symbol commandAliasEnum;
597 ::CommandFlag flags;
598 int firstRule;
599 int firstFactorization;
600 int firstOptional;
601 bool runnable;
602 uint64 ruleCounter;
603 // NOLINTEND
604
605 public:
606 // prevent constructor by default
607 Signature();
608
609 public:
610 // member functions
611 // NOLINTBEGIN
612 MCAPI Signature(
613 ::std::string const& name_,
614 char const* description_,
615 ::CommandPermissionLevel level_,
616 ::CommandRegistry::Symbol commandSymbol_,
617 ::CommandFlag flags_,
618 uint64 initialRuleCount
619 );
620
621 MCAPI ~Signature();
622 // NOLINTEND
623
624 public:
625 // constructor thunks
626 // NOLINTBEGIN
627 MCAPI void* $ctor(
628 ::std::string const& name_,
629 char const* description_,
630 ::CommandPermissionLevel level_,
631 ::CommandRegistry::Symbol commandSymbol_,
632 ::CommandFlag flags_,
633 uint64 initialRuleCount
634 );
635 // NOLINTEND
636
637 public:
638 // destructor thunk
639 // NOLINTBEGIN
640 MCAPI void $dtor();
641 // NOLINTEND
642 };
643
644 class Parser {
645 public:
646 // member variables
647 // NOLINTBEGIN
648 ::ll::TypedStorage<8, 8, ::CommandRegistry const&> mRegistry;
649 ::ll::TypedStorage<8, 8, ::CommandRegistry::ParseTable const*> mParseTable;
650 ::ll::TypedStorage<8, 40, ::std::deque<::std::pair<::CommandRegistry::Symbol, ::CommandRegistry::ParseToken*>>>
651 mStack;
652 ::ll::TypedStorage<8, 32, ::CommandRegistry::LexicalToken> mNext;
653 ::ll::TypedStorage<8, 32, ::std::string> mInput;
654 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CommandRegistry::ParseToken>> mRoot;
655 ::ll::TypedStorage<8, 32, ::std::string> mError;
656 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mErrorParams;
657 ::ll::TypedStorage<4, 4, int> mVersion;
658 ::ll::TypedStorage<1, 1, bool> mGenerateParams;
659 ::ll::TypedStorage<1, 1, bool> mBreakAtEnd;
660 // NOLINTEND
661
662 public:
663 // prevent constructor by default
664 Parser& operator=(Parser const&);
665 Parser(Parser const&);
666 Parser();
667
668 public:
669 // member functions
670 // NOLINTBEGIN
671 MCAPI Parser(::CommandRegistry const& registry, int version);
672
673 MCAPI ::entt::internal::dense_map_iterator<::entt::internal::dense_map_node<
674 ::std::pair<::CommandRegistry::Symbol, ::CommandRegistry::Symbol>,
675 int> const*>
676 _findParsePrediction(
677 ::CommandRegistry::LexicalToken const& lexToken,
678 ::CommandRegistry::Symbol const& stackSymbol
679 ) const;
680
681 MCAPI bool _parse(::std::string const& in);
682
683 MCAPI ::std::unique_ptr<::Command> createCommand(::CommandOrigin const& origin);
684
685 MCAPI ::std::unique_ptr<::CommandSelector<::Actor>>
686 createSelector(::std::string const& selectorString, ::CommandOrigin const& origin);
687
688 MCFOLD ::std::string const& getErrorMessage() const;
689
690 MCAPI ::std::vector<::std::string> getErrorParams() const;
691
692 MCAPI bool parseCommand(::std::string const& in);
693
694 MCAPI bool parseSelector(::std::string const& in);
695
696 MCAPI ~Parser();
697 // NOLINTEND
698
699 public:
700 // constructor thunks
701 // NOLINTBEGIN
702 MCAPI void* $ctor(::CommandRegistry const& registry, int version);
703 // NOLINTEND
704
705 public:
706 // destructor thunk
707 // NOLINTBEGIN
708 MCAPI void $dtor();
709 // NOLINTEND
710 };
711
712 using ChainedSubcommandConversionFunction = ::std::function<void(void*, uint64)>;
713
714 using ChainedSubcommandID = uint;
715
716 using ChainedSubcommandValueID = uint64;
717
718 using CommandOverrideFunctor =
719 ::std::function<void(::std::string const&, ::CommandFlag&, ::CommandPermissionLevel&)>;
720
721 using CommandVisitCallback = ::std::function<bool(::CommandRegistry::ParseToken const*, ::CommandOrigin const&)>;
722
723 using ConstrainedValueID = uint;
724
725 using ConstrainedValueLookupKey = ::std::pair<uint64, uint>;
726
727 using CustomStorageGetFn = void* (*)(::Command*, int);
728
729 using CustomStorageIsSetFn = bool* (*)(::Command*, int);
730
731 using EnumConversionFunction = ::std::function<void(void*, uint64)>;
732
733 using EnumID = uint;
734
735 using EnumValueID = uint64;
736
737 using HardTerminal = ::CommandLexer::TokenType;
738
739 using ParamVisitCallback = ::std::function<
741
742 using ParseMap = ::std::map<
744 ::entt::dense_set<::CommandRegistry::Symbol, ::CommandRegistry::SymbolHasher, ::std::equal_to<void>>>;
745
746 using ParseTableMap = ::std::map<uint, ::CommandRegistry::ParseTable>;
747
748 using PredictTable = ::entt::dense_map<
749 ::std::pair<::CommandRegistry::Symbol, ::CommandRegistry::Symbol>,
750 int,
752 ::std::equal_to<void>>;
753
754 using ProcessFunction =
756
757 using RuleIndex = int;
758
759 using ScoreboardScoreAccessor = ::std::function<int(bool&, ::std::string const&, ::Actor const&)>;
760
761 using SemanticConstraintID = uchar;
762
763 using SoftEnumID = uint;
764
766
767 using SymbolSet =
768 ::entt::dense_set<::CommandRegistry::Symbol, ::CommandRegistry::SymbolHasher, ::std::equal_to<void>>;
769
770 using SymbolVector = ::std::vector<::CommandRegistry::Symbol>;
771
772 using Terminal = ::CommandRegistry::Symbol;
773
774 using ValueTypeID = uint64;
775
776public:
777 // member variables
778 // NOLINTBEGIN
779 ::std::function<void(::Packet const&)> mNetworkUpdateCallback;
780 ScoreboardScoreAccessor mGetScoreForObjective;
781 bool mIsEduMode;
782 ::std::vector<::CommandRegistry::ParseRule> mRules;
783 ::std::map<uint, ::CommandRegistry::ParseTable> mParseTables;
784 ::std::vector<::CommandRegistry::OptionalParameterChain> mOptionals;
785 ::std::vector<::std::string> mEnumValues;
786 ::std::vector<::CommandRegistry::Enum> mEnums;
787 ::std::vector<::std::string> mChainedSubcommandValues;
788 ::std::vector<::CommandRegistry::ChainedSubcommand> mChainedSubcommands;
789 ::std::vector<::CommandRegistry::Factorization> mFactorizations;
790 ::std::vector<::std::string> mPostfixes;
791 ::std::map<::std::string, uint> mEnumLookup;
792 ::std::map<::std::string, uint64> mEnumValueLookup;
793 ::std::map<::std::string, uint> mChainedSubcommandLookup;
794 ::std::map<::std::string, uint64> mChainedSubcommandValueLookup;
795 ::std::vector<::CommandRegistry::Symbol> mCommandSymbols;
796 ::std::map<::std::string, ::CommandRegistry::Signature> mSignatures;
797 ::std::map<::Bedrock::typeid_t<::CommandRegistry>, int> mTypeLookup;
798 ::std::map<::std::string, ::std::string> mAliases;
799 ::std::vector<::SemanticConstraint> mSemanticConstraints;
800 ::std::map<::SemanticConstraint, uchar> mSemanticConstraintLookup;
801 ::std::vector<::CommandRegistry::ConstrainedValue> mConstrainedValues;
802 ::std::map<::std::pair<uint64, uint>, uint> mConstrainedValueLookup;
803 ::std::vector<::CommandRegistry::SoftEnum> mSoftEnums;
804 ::std::map<::std::string, uint> mSoftEnumLookup;
805 ::std::vector<::CommandRegistry::RegistryState> mStateStack;
807 ::std::unordered_set<int> mSkipOnEpsAutocompleteSymbols;
808 ::std::unordered_set<int> mAllowEmptySymbols;
809 CommandOverrideFunctor mCommandOverrideFunctor;
810 ::std::unique_ptr<::CommandRunStats> mCommandRunStats;
811 ::ll::TypedStorage<
812 8,
813 8,
814 ::std::string (*)(
815 ::std::string const&,
816 ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&,
818 )>
819 mAutoCompletePlayerMention;
820 // NOLINTEND
821
822 template <class T>
823 bool parse(
824 void* storage,
825 CommandRegistry::ParseToken const& token,
826 CommandOrigin const& origin,
827 int version,
828 std::string& error,
829 std::vector<std::string>& errorParams
830 ) const;
831
832 template <class E, class C>
833 bool parseEnum(
834 void* storage,
835 CommandRegistry::ParseToken const& token,
836 CommandOrigin const& origin,
837 int version,
838 std::string& error,
839 std::vector<std::string>& errorParams
840 ) const;
841
842 uint64 getEnumData(ParseToken const& token) const {
843 auto& values = mEnums[token.type.toIndex()].values;
844 return std::lower_bound(
845 values.begin(),
846 values.end(),
847 token.child->type.toIndex(),
848 [](auto& pair, auto& child) { return pair.first < child; }
849 )->second;
850 }
851
852public:
853 // prevent constructor by default
855
856public:
857 // member functions
858 // NOLINTBEGIN
859 MCAPI explicit CommandRegistry(::CommandRegistryArguments args);
860
861 MCAPI ::CommandRegistry::Symbol _addChainedSubcommandValuesInternal(
862 ::std::string const& name,
863 ::std::vector<::std::pair<::std::string, uint>> const& strings,
865 bool (CommandRegistry::*parse)(
866 void*,
868 ::CommandOrigin const&,
869 int,
870 ::std::string&,
871 ::std::vector<::std::string>&
872 ) const,
874 );
875
876 MCAPI ::CommandRegistry::Symbol _addChainedSubcommandValuesInternal(
877 ::std::string const& name,
878 ::std::vector<::std::pair<uint64, uint>> const& values,
880 bool (CommandRegistry::*parse)(
881 void*,
883 ::CommandOrigin const&,
884 int,
885 ::std::string&,
886 ::std::vector<::std::string>&
887 ) const,
889 );
890
891 MCAPI void _addEnumValueConstraintsInternal(
892 ::std::vector<::std::pair<uint64, uint>> const& constrainedValueKeys,
893 ::SemanticConstraint constraints
894 );
895
896 MCAPI void _addEnumValueConstraintsToExisting(uint constrainedValueId, ::SemanticConstraint constraints);
897
898 MCAPI ::CommandRegistry::Symbol _addEnumValuesInternal(
899 ::std::string const& name,
900 ::std::vector<::std::pair<::std::string, uint64>> const& strings,
902 bool (CommandRegistry::*parse)(
903 void*,
905 ::CommandOrigin const&,
906 int,
907 ::std::string&,
908 ::std::vector<::std::string>&
909 ) const
910 );
911
912 MCAPI ::CommandRegistry::Symbol _addEnumValuesInternal(
913 ::std::string const& name,
914 ::std::vector<::std::pair<uint64, uint64>> const& values,
916 bool (CommandRegistry::*parse)(
917 void*,
919 ::CommandOrigin const&,
920 int,
921 ::std::string&,
922 ::std::vector<::std::string>&
923 ) const
924 );
925
926 MCAPI ::CommandRegistry::Symbol _addFunctionSoftEnum();
927
928 MCAPI ::std::unique_ptr<::CommandSelector<::Actor>> _createSelector(
930 ::CommandOrigin const& origin,
931 int version,
932 ::std::string& error,
933 ::std::vector<::std::string>& errorParams
934 ) const;
935
936 MCAPI ::CommandRegistry::Symbol _getConstrainedParamEnumSymbol(::CommandRegistry::Symbol symbol) const;
937
938 MCAPI bool _matchesEnumConstraintsSet(
939 ::CommandRegistry::Symbol const& commandParamSymbol,
940 ::CommandOrigin const& origin,
941 ::CommandRegistry::Symbol const& value,
942 ::SemanticConstraint requiredConstraints
943 ) const;
944
945#ifdef LL_PLAT_C
946 MCAPI ::std::vector<::CommandRegistry::Symbol> _reconstructParseStack(
947 ::CommandRegistry::ParseToken const* paramTree,
949 ) const;
950
951 MCAPI ::std::vector<::CommandRegistry::Symbol> _reconstructParseStack(
952 ::std::vector<::CommandParameterData> const& params,
953 uint matchedParams,
954 ::CommandRegistry::ParseToken const* commandParseTree,
956 ) const;
957#endif
958
959 MCAPI void addChainedSubcommandValuesToExisting(uint index, ::std::vector<::std::pair<uint64, uint>> const& values);
960
961 MCAPI void addEnumValueConstraints(
962 ::std::string const& enumName,
963 ::std::vector<::std::string> const& values,
964 ::SemanticConstraint constraints
965 );
966
967 MCAPI int addEnumValues(::std::string const& name, ::std::vector<::std::string> const& values);
968
969 MCAPI void addEnumValuesToExisting(uint index, ::std::vector<::std::pair<uint64, uint64>> const& values);
970
971 MCAPI ::CommandRegistry::Symbol addPostfix(::std::string const& name);
972
973 MCAPI void addRule(
975 ::std::vector<::CommandRegistry::Symbol> derivation,
977 process,
978 ::CommandVersion versions
979 );
980
981 MCAPI void addSemanticConstraint(::SemanticConstraint constraintType);
982
983 MCAPI int addSoftEnum(::std::string const& name, ::std::vector<::std::string> values);
984
985 MCAPI void addSoftEnumValues(::std::string const& enumName, ::std::vector<::std::string> values);
986
987 MCAPI ::CommandRegistry::Symbol addSoftTerminal(::std::string const& name);
988
989#ifdef LL_PLAT_C
990 MCAPI void autoComplete(
992 ::std::string const& cmdLine,
993 ::std::string const& partialMatch,
994 bool newWord,
995 ::CommandOrigin const& origin,
998 ) const;
999
1000 MCAPI void autoCompleteCommand(
1001 ::std::string const& partialMatch,
1002 ::CommandOrigin const& origin,
1004 ) const;
1005#endif
1006
1007 MCAPI void buildFirstSet(::CommandRegistry::ParseTable& table, ::CommandRegistry::Symbol t, uint version) const;
1008
1009 MCAPI void buildFollowSet(
1012 uint version,
1013 ::std::set<::CommandRegistry::Symbol>& workingSet
1014 ) const;
1015
1016 MCAPI ::CommandRegistry::Symbol buildOptionalRuleChain(
1017 ::CommandRegistry::Signature const& signature,
1018 ::std::vector<::CommandParameterData> const& params,
1019 ::std::vector<::CommandRegistry::Symbol> const& symbols
1020 );
1021
1022 MCAPI ::CommandRegistry::Symbol buildOptionalRuleChain(
1023 ::CommandRegistry::Signature const& signature,
1024 ::std::vector<::CommandParameterData> const& params,
1025 ::CommandParameterData const* firstOptional,
1026 uint64 count
1027 );
1028
1029 MCAPI void buildParseTable(uint version) const;
1030
1031 MCAPI void buildPredictTable(::CommandRegistry::ParseTable& table, uint version) const;
1032
1033 MCAPI ::CommandRegistry::Symbol buildRules(
1035 ::std::vector<::gsl::not_null<::CommandRegistry::Overload*>> const& overloads,
1036 uint64 firstParam
1037 );
1038
1039 MCAPI bool
1040 buildSelector(::ActorSelectorArgs const& args, ::CommandSelectorBase* output, ::std::string& error) const;
1041
1042#ifdef LL_PLAT_C
1043 MCAPI bool canCommandBeUsed(
1044 ::std::string const& commandLine,
1045 ::CommandPermissionLevel const& permissionLevel,
1046 bool cheatsEnabled,
1047 bool isEditorWorld
1048 ) const;
1049#endif
1050
1051 MCAPI bool checkOriginCommandFlags(
1052 ::CommandOrigin const& origin,
1053 ::CommandFlag flags,
1054 ::CommandPermissionLevel permissionLevel
1055 ) const;
1056
1057 MCAPI ::std::unique_ptr<::Command> createCommand(
1059 ::CommandOrigin const& origin,
1060 int version,
1061 ::std::string& error,
1062 ::std::vector<::std::string>& errorParams
1063 ) const;
1064
1065 MCAPI ::std::string describe(::CommandParameterData const& param) const;
1066
1067 MCAPI ::std::string describe(::CommandRegistry::Symbol symbol) const;
1068
1069 MCAPI ::std::string describe(
1070 ::CommandRegistry::Signature const& alias,
1071 ::std::string const& overload,
1072 ::CommandRegistry::Overload const& highlight,
1073 uint start,
1074 uint* length,
1075 uint*
1076 ) const;
1077
1078 MCAPI bool enabledInEditor(::std::string const& nameIn) const;
1079
1080 MCAPI void finalizeChainedSubcommandOverloadRules(char const* command);
1081
1082 MCFOLD ::CommandRegistry::Signature const* findCommand(::std::string const& name) const;
1083
1084 MCFOLD ::CommandRegistry::Signature* findCommand(::std::string const& name);
1085
1086 MCAPI ::CommandRegistry::Symbol findIdentifierInfo(::std::string const& name) const;
1087
1088 MCAPI ::CommandRegistry::Symbol findPostfix(::std::string const& input) const;
1089
1090 MCAPI void fireCommandParseTableTelemetry(::IMinecraftEventing const& eventing, bool isServer) const;
1091
1092 MCAPI void forEachNonTerminal(::std::function<void(::CommandRegistry::Symbol)> func) const;
1093
1094 MCAPI ::Json::Value generateDocumentationMetadata(bool generateInternalMetadata) const;
1095
1096 MCAPI ::std::vector<::std::string> getAliases(::std::string const& command) const;
1097
1098 MCAPI ::std::vector<::std::string> getAlphabeticalLookup(::CommandOrigin const& origin) const;
1099
1100#ifdef LL_PLAT_C
1101 MCAPI ::std::unique_ptr<::AutoCompleteInformation> getAutoCompleteOptions(
1102 ::CommandOrigin const& origin,
1103 ::std::string const& _cmdLine,
1104 uint cursorPositionUnsafe
1105 ) const;
1106#endif
1107
1108 MCAPI ::std::string getCommandName(::std::string const& commandLine) const;
1109
1110 MCAPI ::CommandSyntaxInformation
1111 getCommandOverloadSyntaxInformation(::CommandOrigin const& origin, ::std::string const& commandName) const;
1112
1113 MCAPI ::CommandRunStats& getCommandRunStats() const;
1114
1115 MCAPI ::CommandStatus getCommandStatus(::std::string const& nameIn) const;
1116
1117 MCAPI ::InvertableFilter<::std::string> getInvertableFilter(::CommandRegistry::ParseToken const& token) const;
1118
1119#ifdef LL_PLAT_C
1120 MCAPI ::CommandSyntaxInformation getOverloadSyntaxInformation(
1121 ::CommandOrigin const& origin,
1122 ::std::string const& cmdLine,
1123 uint cursorPosition
1124 ) const;
1125
1126 MCAPI bool hasCommands() const;
1127
1128 MCAPI bool hasState() const;
1129#endif
1130
1131 MCAPI bool isCommandOfType(::std::string const& nameIn, ::CommandTypeFlag commandType) const;
1132
1133 MCAPI bool isValid(::CommandRegistry::Symbol symbol) const;
1134
1135 MCAPI bool isValidCommand(::std::string const& commandName) const;
1136
1137#ifdef LL_PLAT_C
1138 MCAPI void loadRemoteCommands(::AvailableCommandsPacket const& packet);
1139#endif
1140
1141 MCAPI bool originCanRun(::CommandOrigin const& origin, ::CommandRegistry::Signature const& command) const;
1142
1143 MCAPI bool originCanRunOverloadWithParam(::CommandOrigin const& origin, ::CommandParameterData const& param) const;
1144
1145#ifdef LL_PLAT_C
1146 MCAPI ::std::string parsePartialCommand(
1148 ::std::string const& _cmdLine,
1149 uint cursorPosition,
1150 bool cutLastToken
1151 ) const;
1152#endif
1153
1154 MCAPI bool parseSelector(
1155 ::ActorSelectorArgs& args,
1156 ::CommandRegistry::ParseToken const& token,
1157 ::CommandOrigin const& error,
1158 int errorParams,
1159 ::std::string&,
1160 ::std::vector<::std::string>&
1161 ) const;
1162
1163 MCAPI bool parseSelector(
1164 ::CommandSelectorBase* output,
1165 ::CommandRegistry::ParseToken const& token,
1166 ::CommandOrigin const& origin,
1167 int version,
1168 ::std::string& error,
1169 ::std::vector<::std::string>& errorParams,
1170 bool
1171 ) const;
1172
1173#ifdef LL_PLAT_C
1174 MCAPI void popState();
1175
1176 MCAPI void pushState();
1177#endif
1178
1179 MCAPI void registerAlias(::std::string name, ::std::string alias);
1180
1181 MCAPI void registerCommand(
1182 ::std::string const& name,
1183 char const* description,
1184 ::CommandPermissionLevel requirement,
1185 ::CommandFlag f1,
1186 ::CommandFlag f2 = {}
1187 );
1188
1189 MCAPI void registerOverload(
1190 char const* command,
1191 ::CommandVersion version,
1192 ::std::function<::std::unique_ptr<::Command>()> allocFn,
1193 ::std::vector<::CommandParameterData> params
1194 );
1195
1196 MCAPI void registerOverloadInternal(::CommandRegistry::Signature& signature, ::CommandRegistry::Overload& overload);
1197
1198 MCAPI void removeSoftEnumValues(::std::string const& enumName, ::std::vector<::std::string> values);
1199
1200#ifdef LL_PLAT_C
1201 MCAPI bool requiresCheatsEnabled(::std::string const& nameIn) const;
1202#endif
1203
1204 MCAPI ::AvailableCommandsPacket serializeAvailableCommands() const;
1205
1206 MCAPI void setCommandRegistrationOverride(CommandOverrideFunctor functor);
1207
1208 MCAPI void setScoreCallback(::std::function<int(bool&, ::std::string const&, ::Actor const&)> callback);
1209
1210 MCAPI void setSoftEnumValues(::std::string const& enumName, ::std::vector<::std::string> values);
1211
1212 MCAPI void setupChainedSubcommandOverloadRules(::CommandRegistry::Signature& signature);
1213
1214 MCAPI void setupOverloadRules(::CommandRegistry::Signature& signature);
1215
1216 MCAPI ::std::string symbolToString(::CommandRegistry::Symbol symbol) const;
1217
1218 MCAPI ~CommandRegistry();
1219 // NOLINTEND
1220
1221public:
1222 // static functions
1223 // NOLINTBEGIN
1224#ifdef LL_PLAT_C
1225 MCAPI static ::BlockType const* _getBlockFromCmdParameters(::std::string const& parameters);
1226#endif
1227
1228 MCAPI static ::std::string _removeStringQuotes(::std::string const& str);
1229
1230 MCFOLD static void buildOverload(::CommandRegistry::Overload& overload);
1231
1232 MCFOLD static ::CommandRegistry::ParseToken*
1233 collapse(::CommandRegistry::ParseToken& parent, ::CommandRegistry::Symbol);
1234
1235 MCAPI static ::CommandRegistry::ParseToken* collapseOn(
1236 ::CommandRegistry::ParseToken& parent,
1237 ::CommandRegistry::Symbol symbol,
1238 ::CommandRegistry::Symbol boundSymbol
1239 );
1240
1241 MCAPI static ::CommandRegistry::ParseToken*
1242 expand(::CommandRegistry::ParseToken& parent, ::CommandRegistry::Symbol symbol);
1243
1244 MCAPI static ::CommandRegistry::ParseToken* expandExcept(
1245 ::CommandRegistry::ParseToken& parent,
1246 ::CommandRegistry::Symbol symbol,
1247 ::CommandRegistry::Symbol boundSymbol
1248 );
1249
1250 MCAPI static ::CommandRegistry::ParseToken* fold(
1251 ::CommandRegistry::ParseToken& parent,
1252 ::CommandRegistry::Symbol symbol,
1253 ::CommandRegistry::Symbol boundSymbol
1254 );
1255
1256#ifdef LL_PLAT_C
1257 MCAPI static bool isParseMatch(::CommandParameterData const& param, ::CommandRegistry::Symbol in);
1258#endif
1259
1260 MCAPI static ::CommandRegistry::ParseToken* kill(::CommandRegistry::ParseToken& parent, ::CommandRegistry::Symbol);
1261
1262 MCAPI static bool readFloat(
1263 float& value,
1264 ::CommandRegistry::ParseToken const& token,
1265 ::std::string& error,
1266 ::std::vector<::std::string>& errorParams
1267 );
1268
1269 MCAPI static bool readInt(
1270 int& value,
1271 ::CommandRegistry::ParseToken const& token,
1272 ::std::string& error,
1273 ::std::vector<::std::string>& errorParams
1274 );
1275
1276 MCAPI static bool readRelativeCoordinate(
1277 bool& relative,
1278 float& offset,
1279 ::CommandRegistry::ParseToken const& token,
1280 bool readIntegerAsCentered,
1281 ::std::string& error,
1282 ::std::vector<::std::string>& errorParams
1283 );
1284
1285 MCAPI static bool readString(
1286 ::std::string& value,
1287 ::CommandRegistry::ParseToken const& token,
1288 ::std::string& error,
1289 ::std::vector<::std::string>& errorParams
1290 );
1291 // NOLINTEND
1292
1293public:
1294 // static variables
1295 // NOLINTBEGIN
1296 MCAPI static char const*& CODE_STATUS_PROPERTY_NAME();
1297
1298 MCAPI static char const*& COMMAND_NAME_ENUM_NAME();
1299
1300 MCAPI static char const*& FUNCTION_NAME_SOFTENUM_NAME();
1301
1302 MCAPI static char const*& HASITEM_PARAM_DATA();
1303
1304 MCAPI static char const*& HASITEM_PARAM_ITEM();
1305
1306 MCAPI static char const*& HASITEM_PARAM_LOCATION();
1307
1308 MCAPI static char const*& HASITEM_PARAM_QUANTITY();
1309
1310 MCAPI static char const*& HASITEM_PARAM_SLOT();
1311
1312 MCAPI static char const*& HASPERMISSIONSTATE_ENUM_DISABLED();
1313
1314 MCAPI static char const*& HASPERMISSIONSTATE_ENUM_ENABLED();
1315
1316 MCAPI static char const*& HASPROPERTY_PARAM_PROPERTY_NAME();
1317
1318 MCAPI static char const*& TAG_VALUES_SOFTENUM_NAME();
1319
1320 MCAPI static char const*& UNLOCKABLE_RECIPES_SOFTENUM_NAME();
1321 // NOLINTEND
1322
1323public:
1324 // constructor thunks
1325 // NOLINTBEGIN
1326 MCAPI void* $ctor(::CommandRegistryArguments args);
1327 // NOLINTEND
1328
1329public:
1330 // destructor thunk
1331 // NOLINTBEGIN
1332 MCAPI void $dtor();
1333 // NOLINTEND
1334};
1335
1336// following are the functions required by CommandParameterData's ParseFunction
1337MCTAPI bool CommandRegistry::parse<std::string>(
1338 void*,
1340 CommandOrigin const&,
1341 int,
1342 std::string&,
1343 std::vector<std::string>&
1344) const;
1345
1346MCTAPI bool CommandRegistry::parse<int>(
1347 void*,
1349 CommandOrigin const&,
1350 int,
1351 std::string&,
1352 std::vector<std::string>&
1353) const;
1354
1355MCTAPI bool CommandRegistry::parse<float>(
1356 void*,
1358 CommandOrigin const&,
1359 int,
1360 std::string&,
1361 std::vector<std::string>&
1362) const;
1363
1364MCTAPI bool CommandRegistry::parse<Json::Value>(
1365 void*,
1367 CommandOrigin const&,
1368 int,
1369 std::string&,
1370 std::vector<std::string>&
1371) const;
1372
1373MCTAPI bool CommandRegistry::parse<CommandCompareOperator>(
1374 void*,
1376 CommandOrigin const&,
1377 int,
1378 std::string&,
1379 std::vector<std::string>&
1380) const;
1381
1382MCTAPI bool CommandRegistry::parse<CommandFilePath>(
1383 void*,
1385 CommandOrigin const&,
1386 int,
1387 std::string&,
1388 std::vector<std::string>&
1389) const;
1390
1391MCTAPI bool CommandRegistry::parse<CommandIntegerRange>(
1392 void*,
1394 CommandOrigin const&,
1395 int,
1396 std::string&,
1397 std::vector<std::string>&
1398) const;
1399
1400MCTAPI bool CommandRegistry::parse<CommandMessage>(
1401 void*,
1403 CommandOrigin const&,
1404 int,
1405 std::string&,
1406 std::vector<std::string>&
1407) const;
1408
1409MCTAPI bool CommandRegistry::parse<CommandOperator>(
1410 void*,
1412 CommandOrigin const&,
1413 int,
1414 std::string&,
1415 std::vector<std::string>&
1416) const;
1417
1418MCTAPI bool CommandRegistry::parse<CommandPosition>(
1419 void*,
1421 CommandOrigin const&,
1422 int,
1423 std::string&,
1424 std::vector<std::string>&
1425) const;
1426
1427MCTAPI bool CommandRegistry::parse<CommandPositionFloat>(
1428 void*,
1430 CommandOrigin const&,
1431 int,
1432 std::string&,
1433 std::vector<std::string>&
1434) const;
1435
1436MCTAPI bool CommandRegistry::parse<CommandRawText>(
1437 void*,
1439 CommandOrigin const&,
1440 int,
1441 std::string&,
1442 std::vector<std::string>&
1443) const;
1444
1445MCTAPI bool CommandRegistry::parse<CommandSelector<Actor>>(
1446 void*,
1448 CommandOrigin const&,
1449 int,
1450 std::string&,
1451 std::vector<std::string>&
1452) const;
1453
1454MCTAPI bool CommandRegistry::parse<CommandSelector<Player>>(
1455 void*,
1457 CommandOrigin const&,
1458 int,
1459 std::string&,
1460 std::vector<std::string>&
1461) const;
1462
1463MCTAPI bool CommandRegistry::parse<CommandWildcardInt>(
1464 void*,
1466 CommandOrigin const&,
1467 int,
1468 std::string&,
1469 std::vector<std::string>&
1470) const;
1471
1472MCTAPI bool CommandRegistry::parse<class RelativeFloat>(
1473 void*,
1475 CommandOrigin const&,
1476 int,
1477 std::string&,
1478 std::vector<std::string>&
1479) const;
1480
1481MCTAPI bool CommandRegistry::parse<WildcardCommandSelector<Actor>>(
1482 void*,
1484 CommandOrigin const&,
1485 int,
1486 std::string&,
1487 std::vector<std::string>&
1488) const;
1489
1490MCTAPI bool CommandRegistry::parse<std::unique_ptr<::Command>>(
1491 void*,
1493 CommandOrigin const&,
1494 int,
1495 std::string&,
1496 std::vector<std::string>&
1497) const;
1498
1499MCTAPI bool CommandRegistry::parse<std::vector<BlockStateCommandParam>>(
1500 void*,
1502 CommandOrigin const&,
1503 int,
1504 std::string&,
1505 std::vector<std::string>&
1506) const;
1507
1508MCTAPI bool CommandRegistry::parseEnum<CommandChainedSubcommand, void>(
1509 void*,
1511 CommandOrigin const&,
1512 int,
1513 std::string&,
1514 std::vector<std::string>&
1515) const;
Definition Actor.h:123
Definition AvailableCommandsPacket.h:19
Definition typeid_t.h:25
Definition BlockState.h:14
Definition BlockType.h:84
Definition CommandOrigin.h:32
Definition CommandParameterData.h:18
Definition CommandRegistry.h:644
Definition CommandRegistry.h:264
Definition CommandRegistry.h:51
Definition CommandRunStats.h:8
Definition CommandSelectorBase.h:28
Definition CommandVersion.h:13
Definition Command.h:18
Definition IMinecraftEventing.h:138
Definition Value.h:16
Definition Packet.h:30
Definition PlayerListEntry.h:20
Definition copyable_function.h:8
Definition UUID.h:7
Definition ActorSelectorArgs.h:21
Definition AutoCompleteInformation.h:10
Definition CommandFlag.h:43
Definition CommandLexer.h:50
Definition CommandRegistryArguments.h:12
Definition CommandRegistry.h:425
Definition CommandRegistry.h:297
Definition CommandRegistry.h:448
Definition CommandRegistry.h:307
Definition CommandRegistry.h:315
Definition CommandRegistry.h:339
Definition CommandRegistry.h:349
Definition CommandRegistry.h:471
Definition CommandRegistry.h:366
Definition CommandRegistry.h:491
Definition CommandRegistry.h:550
Definition CommandRegistry.h:398
Definition CommandRegistry.h:184
Definition CommandRegistry.h:518
Definition CommandRegistry.h:586
Definition CommandRegistry.h:239
Definition CommandRegistry.h:546
Definition CommandRegistry.h:548
Definition CommandSyntaxInformation.h:10