LeviLamina
Loading...
Searching...
No Matches
GameTestCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/ServerCommand.h"
7#include "mc/util/Rotation.h"
8
9// auto generated forward declare list
10// clang-format off
11class BlockPos;
12class BlockSource;
13class CommandOrigin;
14class CommandOutput;
15class CommandRegistry;
17namespace gametest { struct TestParameters; }
18// clang-format on
19
20class GameTestCommand : public ::ServerCommand {
21public:
22 // GameTestCommand inner types define
23 enum class Mode : int {
24 Unknown = 0,
25 ClearAll = 1,
26 Create = 2,
27 Run = 3,
28 RunThis = 4,
29 RunSet = 5,
30 RunSetUntilFail = 6,
31 RunNearbyTests = 7,
32 ShowPosition = 8,
33 Stop = 9,
34 };
35
36public:
37 // member variables
38 // NOLINTBEGIN
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 GameTestCommand& operator=(GameTestCommand const&);
53 GameTestCommand(GameTestCommand const&);
54 GameTestCommand();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
60
61 virtual ~GameTestCommand() /*override*/ = default;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI ::gametest::TestParameters _createTestParameters(::BlockSource& region, ::CommandOrigin const& origin) const;
68
69 MCAPI void _handleCreateTest(::BlockSource& region, ::CommandOrigin const& origin, ::CommandOutput& output) const;
70
71 MCAPI void _handleRun(
72 ::MinecraftGameTest& gameTest,
73 ::BlockSource& region,
74 ::CommandOrigin const& origin,
75 ::CommandOutput& output
76 ) const;
77
78 MCAPI void _handleRunNearbyTests(
79 ::MinecraftGameTest& gameTest,
80 ::BlockSource& region,
81 ::CommandOrigin const& origin,
82 ::CommandOutput& output
83 ) const;
84
85 MCAPI void _handleRunSet(
86 ::MinecraftGameTest& gameTest,
87 ::BlockSource& region,
88 ::CommandOrigin const& origin,
89 ::CommandOutput& output,
90 bool stopOtherTestsOnFailure
91 ) const;
92
93 MCAPI void _handleRunThis(
94 ::MinecraftGameTest& gameTest,
95 ::BlockSource& region,
96 ::CommandOrigin const& origin,
97 ::CommandOutput& output
98 ) const;
99
100 MCAPI void _handleShowPosition(::BlockSource& region, ::CommandOrigin const& origin, ::CommandOutput& output) const;
101
102 MCAPI void _runTestAt(
103 ::MinecraftGameTest& gameTest,
104 ::BlockSource& region,
105 ::CommandOutput* output,
106 ::BlockPos const& structureBlockPos,
107 ::std::optional<::Rotation> rotation
108 ) const;
109 // NOLINTEND
110
111public:
112 // static functions
113 // NOLINTBEGIN
114 MCAPI static void addGameTestNameEnums(::MinecraftGameTest& gameTest, ::CommandRegistry& commandRegistry);
115
116 MCAPI static void setup(::CommandRegistry& registry);
117 // NOLINTEND
118
119public:
120 // virtual function thunks
121 // NOLINTBEGIN
122 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
123
124
125 // NOLINTEND
126
127public:
128 // vftables
129 // NOLINTBEGIN
130 MCNAPI static void** $vftable();
131 // NOLINTEND
132};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:47
static MCAPI void ** $vftable()
Definition MinecraftGameTest.h:20
Definition ServerCommand.h:22
Definition TestParameters.h:16
Definition Alias.h:14