LeviLamina
Loading...
Searching...
No Matches
CommandOrigin.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/crypto/random/Random.h"
5#include "mc/platform/UUID.h"
6
7// auto generated inclusion list
8#include "mc/common/SubClientId.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/platform/UUID.h"
11#include "mc/server/commands/CommandOriginType.h"
12#include "mc/server/commands/CommandPermissionLevel.h"
13#include "mc/world/actor/player/AbilitiesIndex.h"
14
15// auto generated forward declare list
16// clang-format off
17class Actor;
18class BlockPos;
19class CommandArea;
21class CompoundTag;
22class Dimension;
23class ILevel;
24class Level;
26class Vec2;
27class Vec3;
30// clang-format on
31
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 16, ::mce::UUID> mUUID;
37 // NOLINTEND
38
39public:
40 CommandOrigin() { mUUID = Crypto::Random::generateUUID(); }
41 LLNDAPI std::string getLocaleCode() const;
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 // vIndex: 0
47 virtual ~CommandOrigin() = default;
48
49 // vIndex: 1
50 virtual ::std::string const& getRequestId() const = 0;
51
52 // vIndex: 2
53 virtual ::std::string getName() const = 0;
54
55 // vIndex: 3
56 virtual ::BlockPos getBlockPosition() const = 0;
57
58 // vIndex: 4
59 virtual ::Vec3 getWorldPosition() const = 0;
60
61 // vIndex: 5
62 virtual ::std::optional<::Vec2> getRotation() const = 0;
63
64 // vIndex: 6
65 virtual ::Level* getLevel() const = 0;
66
67 // vIndex: 7
68 virtual ::Dimension* getDimension() const = 0;
69
70 // vIndex: 8
71 virtual ::Actor* getEntity() const = 0;
72
73 // vIndex: 9
74 virtual ::CommandPermissionLevel getPermissionsLevel() const = 0;
75
76 // vIndex: 10
77 virtual ::std::unique_ptr<::CommandOrigin> clone() const = 0;
78
79 // vIndex: 11
80 virtual ::std::optional<::BlockPos> getCursorHitBlockPos() const;
81
82 // vIndex: 12
83 virtual ::std::optional<::Vec3> getCursorHitPos() const;
84
85 // vIndex: 13
86 virtual bool hasChatPerms() const;
87
88 // vIndex: 14
89 virtual bool hasTellPerms() const;
90
91 // vIndex: 15
92 virtual bool canUseAbility(::AbilitiesIndex ability) const;
93
94 // vIndex: 16
95 virtual bool isWorldBuilder() const;
96
97 // vIndex: 17
98 virtual bool canUseCommandsWithoutCheatsEnabled() const;
99
100 // vIndex: 18
101 virtual bool isSelectorExpansionAllowed() const;
102
103 // vIndex: 19
104 virtual ::NetworkIdentifier const& getSourceId() const;
105
106 // vIndex: 20
107 virtual ::SubClientId getSourceSubId() const;
108
109 // vIndex: 21
110 virtual ::CommandOrigin const& getOutputReceiver() const;
111
112 // vIndex: 22
113 virtual ::CommandOriginIdentity getIdentity() const;
114
115 // vIndex: 23
116 virtual ::CommandOriginType getOriginType() const = 0;
117
118 // vIndex: 24
119 virtual ::CommandOriginData toCommandOriginData() const;
120
121 // vIndex: 25
122 virtual ::mce::UUID const& getUUID() const;
123
124 // vIndex: 26
125 virtual void handleCommandOutputCallback(int, ::std::string&&) const;
126
127 // vIndex: 27
128 virtual void updateValues();
129
130 // vIndex: 28
131 virtual ::Vec3 const getExecutePosition(int version, ::CommandPositionFloat const& commandPosition) const;
132
133 // vIndex: 29
134 virtual ::CompoundTag serialize() const;
135
136 // vIndex: 30
137 virtual bool isValid() const = 0;
138
139 // vIndex: 31
140 virtual bool requiresValidLevel() const;
141
142 // vIndex: 32
143 virtual void _setUUID(::mce::UUID const& uuid);
144 // NOLINTEND
145
146public:
147 // member functions
148 // NOLINTBEGIN
149 MCAPI ::std::unique_ptr<::CommandArea> getAreaAt(::BlockPos const& pos, int commandVersion) const;
150
151 MCAPI ::std::unique_ptr<::CommandArea>
152 getAreaAt(::BlockPos const& min, ::BlockPos const& max, int commandVersion, bool allowUnloadedChunks) const;
153
154 MCAPI ::std::unique_ptr<::CommandArea> getAreaAtWithBuffer(
155 ::BlockPos const& min,
156 ::BlockPos const& max,
157 int commandVersion,
158 bool allowUnloadedChunks
159 ) const;
160 // NOLINTEND
161
162public:
163 // static functions
164 // NOLINTBEGIN
165 MCAPI static ::std::unique_ptr<::CommandOrigin> fromCommandOriginData(
166 ::CommandOriginData const& data,
168 ::NetworkIdentifier const& sourceId,
169 ::SubClientId sourceSubId
170 );
171 // NOLINTEND
172
173public:
174 // static variables
175 // NOLINTBEGIN
176 MCAPI static ::NetworkIdentifier& sUnknownSource();
177 // NOLINTEND
178
179public:
180 // virtual function thunks
181 // NOLINTBEGIN
182 MCFOLD ::std::optional<::BlockPos> $getCursorHitBlockPos() const;
183
184 MCFOLD ::std::optional<::Vec3> $getCursorHitPos() const;
185
186 MCAPI bool $hasChatPerms() const;
187
188 MCAPI bool $hasTellPerms() const;
189
190 MCFOLD bool $canUseAbility(::AbilitiesIndex ability) const;
191
192 MCAPI bool $isWorldBuilder() const;
193
194 MCFOLD bool $canUseCommandsWithoutCheatsEnabled() const;
195
196 MCAPI bool $isSelectorExpansionAllowed() const;
197
198 MCAPI ::NetworkIdentifier const& $getSourceId() const;
199
200 MCFOLD ::SubClientId $getSourceSubId() const;
201
202 MCFOLD ::CommandOrigin const& $getOutputReceiver() const;
203
204 MCAPI ::CommandOriginIdentity $getIdentity() const;
205
206 MCAPI ::CommandOriginData $toCommandOriginData() const;
207
208 MCFOLD ::mce::UUID const& $getUUID() const;
209
210 MCFOLD void $handleCommandOutputCallback(int, ::std::string&&) const;
211
212 MCFOLD void $updateValues();
213
214 MCAPI ::Vec3 const $getExecutePosition(int version, ::CommandPositionFloat const& commandPosition) const;
215
216 MCAPI ::CompoundTag $serialize() const;
217
218 MCFOLD bool $requiresValidLevel() const;
219
220 MCFOLD void $_setUUID(::mce::UUID const& uuid);
221 // NOLINTEND
222
223public:
224 // vftables
225 // NOLINTBEGIN
226 MCNAPI static void** $vftable();
227 // NOLINTEND
228};
Definition Actor.h:102
Definition NonOwnerPointer.h:9
Definition BlockPos.h:17
Definition CommandArea.h:5
Definition CommandOrigin.h:32
static MCAPI void ** $vftable()
Definition CommandPositionFloat.h:8
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition ILevel.h:207
Definition Level.h:243
Definition NetworkIdentifier.h:10
Definition Vec2.h:5
Definition Vec3.h:10
Definition UUID.h:7
Definition CommandOriginData.h:9
Definition CommandOriginIdentity.h:5
Definition serialize.h:11