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