LeviLamina
Loading...
Searching...
No Matches
LocalPlayer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/routing/routes/GameplayRouteHandler.h"
7#include "mc/common/Brightness.h"
8#include "mc/deps/core/math/Vec2.h"
9#include "mc/deps/core/math/Vec3.h"
10#include "mc/deps/core/string/HashedString.h"
11#include "mc/deps/core/utility/AutomaticID.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13#include "mc/deps/core/utility/pub_sub/Subscription.h"
14#include "mc/deps/shared_types/legacy/ContainerType.h"
15#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
16#include "mc/deps/shared_types/legacy/item/EquipmentSlot.h"
17#include "mc/network/packet/PlayerRespawnState.h"
18#include "mc/platform/UUID.h"
19#include "mc/world/actor/ActorEvent.h"
20#include "mc/world/actor/ActorInitializationMethod.h"
21#include "mc/world/actor/ActorResetRule.h"
22#include "mc/world/actor/player/BedSleepingResult.h"
23#include "mc/world/actor/player/Player.h"
24#include "mc/world/inventory/InventoryMenu.h"
25#include "mc/world/item/ItemStack.h"
26#include "mc/world/level/BlockPos.h"
27#include "mc/world/level/GameType.h"
28#include "mc/world/level/chunk/NetworkChunkSubscriber.h"
29
30// auto generated forward declare list
31// clang-format off
32class Actor;
34class BlockActor;
37class ChunkPos;
38class ChunkSource;
40class CompoundTag;
41class Container;
42class DataLoadHelper;
43class Dimension;
44class EntityContext;
46class IClientInstance;
47class IClientInstance;
50class InventoryMenu;
55class Packet;
58class SubChunkPos;
60class TextObjectRoot;
61struct ActorUniqueID;
62struct Brightness;
63struct INpcDialogueData;
64struct Tick;
65namespace Editor { class IEditorPlayer; }
66namespace MovementDataExtractionUtility { class SnapshotAccessor; }
67namespace OreUI { class GameplayRouteHandler; }
68namespace mce { class UUID; }
69// clang-format on
70
71class LocalPlayer : public ::Player {
72public:
73 // LocalPlayer inner types declare
74 // clang-format off
75 struct ContainerCloseInfo;
78 class RegionListener;
80 // clang-format on
81
82 // LocalPlayer inner types define
84 public:
85 // virtual functions
86 // NOLINTBEGIN
87 // vIndex: 0
88 virtual ~RegionListener() = default;
89
90 // vIndex: 1
91 virtual void onRegionDestroyed() = 0;
92 // NOLINTEND
93
94 public:
95 // virtual function thunks
96 // NOLINTBEGIN
97
98 // NOLINTEND
99 };
100
102 public:
103 // member variables
104 // NOLINTBEGIN
105 ::ll::TypedStorage<8, 8, int64> mEmoteButtonDownStartTime;
106 ::ll::TypedStorage<1, 1, bool> mIsExpediateSelectionActive;
107 // NOLINTEND
108 };
109
111 public:
112 // FellFromWorldHeightAchievementTracker inner types define
113 enum class FallState : uchar {
114 Falling = 0,
115 TickCheckAliveTicks = 1,
116 CheckForAlive = 2,
117 Done = 3,
118 };
119
120 public:
121 // member variables
122 // NOLINTBEGIN
123 ::ll::TypedStorage<1, 1, ::LocalPlayer::FellFromWorldHeightAchievementTracker::FallState> mState;
124 ::ll::TypedStorage<4, 4, int> mCheckAliveTicks;
125 ::ll::TypedStorage<1, 1, bool> mHasSentAchievement;
126 // NOLINTEND
127 };
128
130 public:
131 // member variables
132 // NOLINTBEGIN
133 ::ll::TypedStorage<1, 1, bool> mIsUndergroundCurrentTick;
134 ::ll::TypedStorage<1, 1, bool> mWasUndergroundPreviousTick;
135 ::ll::TypedStorage<1, 1, bool> mForceInitialEventingPropertyUpdate;
136 ::ll::TypedStorage<4, 12, ::BlockPos> mPreviousBlockPos;
137 ::ll::TypedStorage<1, 1, ::Brightness> mPreviousNaturalLightLevel;
138 // NOLINTEND
139 };
140
142 public:
143 // member variables
144 // NOLINTBEGIN
145 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::ContainerType> mContainerTypeToClose;
146 ::ll::TypedStorage<1, 1, bool> mShouldCloseContainerScreen;
147 // NOLINTEND
148 };
149
150public:
151 // member variables
152 // NOLINTBEGIN
153 ::ll::TypedStorage<8, 112, ::InventoryMenu> mInventoryMenu;
154 ::ll::TypedStorage<4, 4, float> mPortalEffectTime;
155 ::ll::TypedStorage<4, 4, float> mOPortalEffectTime;
156 ::ll::TypedStorage<8, 16, ::LocalPlayer::EmoteExpediateData> mEmoteExpediateData;
157 ::ll::TypedStorage<4, 20, ::LocalPlayer::UndergroundTelemetryHeuristic> mUndergroundTelemetryHeuristic;
158 ::ll::TypedStorage<4, 12, ::LocalPlayer::FellFromWorldHeightAchievementTracker>
159 mFellFromWorldHeightAchievementTracker;
160 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mLowMemorySubscription;
161 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
162 ::ll::TypedStorage<4, 4, int> mCanCloseScreenOnHurtAfterTime;
163 ::ll::TypedStorage<4, 12, ::Vec3> mlastFrameDelta;
164 ::ll::TypedStorage<4, 8, ::Vec2> mLastHmdRot;
165 ::ll::TypedStorage<4, 8, ::Vec2> mHmdAngleDelta;
166 ::ll::TypedStorage<1, 1, bool> mHmdRotRecorded;
167 ::ll::TypedStorage<1, 1, bool> mEnablePortalEffect;
168 ::ll::TypedStorage<8, 152, ::ItemStack> mSentOffhandItem;
169 ::ll::TypedStorage<8, 152, ::ItemStack> mSentInventoryItem;
170 ::ll::TypedStorage<4, 4, int> mSentSelectedSlot;
171 ::ll::TypedStorage<1, 2, ::LocalPlayer::ContainerCloseInfo> mContainerCloseInfo;
172 ::ll::TypedStorage<8, 8, uint64> mSessionTickCount;
173 ::ll::TypedStorage<8, 24, ::std::vector<::LocalPlayer::RegionListener*>> mRegionListeners;
174 ::ll::TypedStorage<1, 1, bool> mDamagedByMobThisFrame;
175 ::ll::TypedStorage<1, 1, bool> mLeavingLevel;
176 ::ll::TypedStorage<1, 1, bool> mIsTeacher;
177 ::ll::TypedStorage<1, 1, bool> mHasBeenInitialized;
178 ::ll::TypedStorage<1, 1, bool> mPrevTransitionBlocking;
179 ::ll::TypedStorage<8, 32, ::std::string> mInventorySearchString;
180 ::ll::TypedStorage<8, 64, ::std::unordered_set<::mce::UUID>> mAllSentEmotePieceIds;
181 ::ll::TypedStorage<8, 48, ::HashedString> mCurrentStructureFeature;
182 ::ll::TypedStorage<8, 152, ::ItemStack> mItemActivationItem;
183 ::ll::TypedStorage<4, 4, int> mItemActivationTicks;
184 ::ll::TypedStorage<4, 4, float> mItemActivationOffsetX;
185 ::ll::TypedStorage<4, 4, float> mItemActivationOffsetY;
186 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerAutomationObserver>> mAutomationObserver;
187 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkRequestSubscriber>> mSubChunkSubscriber;
188 ::ll::TypedStorage<4, 4, uint> mTickingAreaChunkIndexToCheckForRequests;
189 ::ll::TypedStorage<8, 32, ::NetworkChunkSubscriber> mChunkSubscriberView;
190 ::ll::TypedStorage<1, 1, ::PlayerRespawnState> mClientRespawnState;
191 ::ll::TypedStorage<4, 12, ::Vec3> mClientRespawnPotentialPosition;
192 ::ll::TypedStorage<4, 4, int> mResetHMDAfterSleepTickDelay;
193 ::ll::TypedStorage<4, 4, int> mRenderChunkRadiusLowMemoryWatermark;
194 ::ll::TypedStorage<8, 32, ::std::string> mLastDeathInfo;
195 ::ll::TypedStorage<8, 120, ::OreUI::GameplayRouteHandler> mGameplayRouteHandler;
196 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorPlayer>> mEditorClientPlayer;
197 ::ll::TypedStorage<4, 4, float> mCurrentExpCache;
198 ::ll::TypedStorage<4, 4, int> mCurrentLevelCache;
199 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastLevelChangedTimePoint;
200 ::ll::TypedStorage<1, 1, bool> mPreparedMainChunkSource;
201 // NOLINTEND
202
203public:
204 // prevent constructor by default
205 LocalPlayer& operator=(LocalPlayer const&);
206 LocalPlayer(LocalPlayer const&);
207 LocalPlayer();
208
209public:
210 // virtual functions
211 // NOLINTBEGIN
212 // vIndex: 0
213 virtual ~LocalPlayer() /*override*/ = default;
214
215 // vIndex: 3
216 virtual void reloadHardcodedClient(::ActorInitializationMethod) /*override*/;
217
218 // vIndex: 177
219 virtual void prepareRegion(::ChunkSource& mainChunkSource) /*override*/;
220
221 // vIndex: 179
222 virtual void suspendRegion() /*override*/;
223
224 // vIndex: 178
225 virtual void destroyRegion() /*override*/;
226
227 // vIndex: 182
228 virtual void tickWorld(::Tick const&) /*override*/;
229
230 // vIndex: 183
231 virtual void frameUpdate(::FrameUpdateContextBase&) /*override*/;
232
233 // vIndex: 184
234 virtual ::std::vector<::ChunkPos> const& getTickingOffsets() const /*override*/;
235
236 // vIndex: 24
237 virtual void normalTick() /*override*/;
238
239 // vIndex: 27
240 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
241
242 // vIndex: 145
243 virtual void aiStep() /*override*/;
244
245 // vIndex: 137
246 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
247
248 // vIndex: 136
249 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
250
251 // vIndex: 223
252 virtual void deleteContainerManager() /*override*/;
253
254 // vIndex: 193
255 virtual void openPortfolio() /*override*/;
256
257 // vIndex: 194
258 virtual void openBook(int, bool, int, ::BlockActor*) /*override*/;
259
260 // vIndex: 196
261 virtual void openChalkboard(::ChalkboardBlockActor&, bool) /*override*/;
262
263 // vIndex: 197
264 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc) /*override*/;
265
266 // vIndex: 195
267 virtual void openTrading(::ActorUniqueID const&, bool) /*override*/;
268
269 // vIndex: 198
270 virtual void openInventory() /*override*/;
271
272 // vIndex: 220
273 virtual void setContainerData(::IContainerManager&, int, int) /*override*/;
274
275 // vIndex: 221
276 virtual void
277 slotChanged(::IContainerManager&, ::Container&, int, ::ItemStack const&, ::ItemStack const&, bool) /*override*/;
278
279 // vIndex: 222
280 virtual void refreshContainer(::IContainerManager&) /*override*/;
281
282 // vIndex: 210
283 virtual bool isLoading() const /*override*/;
284
285 // vIndex: 212
286 virtual void stopLoading() /*override*/;
287
288 // vIndex: 190
289 virtual void respawn() /*override*/;
290
291 // vIndex: 200
292 virtual void displayClientMessage(
293 ::std::string const& message,
294 ::std::optional<::std::string> const filteredMessage
295 ) /*override*/;
296
297 // vIndex: 201
298 virtual void displayTextObjectMessage(
299 ::TextObjectRoot const& textObject,
300 ::std::string const& fromXuid,
301 ::std::string const& fromPlatformId
302 ) /*override*/;
303
304 // vIndex: 204
305 virtual void displayWhisperMessage(
306 ::std::string const& author,
307 ::std::string const& message,
308 ::std::optional<::std::string> const filteredMessage,
309 ::std::string const& xuid,
310 ::std::string const& platformId
311 ) /*override*/;
312
313 // vIndex: 205
314 virtual ::BedSleepingResult startSleepInBed(::BlockPos const& bedBlockPos) /*override*/;
315
316 // vIndex: 206
317 virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList) /*override*/;
318
319 // vIndex: 207
320 virtual bool canStartSleepInBed() /*override*/;
321
322 // vIndex: 87
323 virtual void handleInsidePortal(::BlockPos const& portalPos) /*override*/;
324
325 // vIndex: 111
326 virtual void swing() /*override*/;
327
328 // vIndex: 44
329 virtual void setSneaking(bool value) /*override*/;
330
331 // vIndex: 140
332 virtual void setSprinting(bool shouldSprint) /*override*/;
333
334 // vIndex: 209
335 virtual void playEmote(::std::string const&, bool const) /*override*/;
336
337 // vIndex: 191
338 virtual void resetRot() /*override*/;
339
340 // vIndex: 9
341 virtual void resetUserPos(::ActorResetRule) /*override*/;
342
343 // vIndex: 21
344 virtual void teleportTo(::Vec3 const&, bool, int, int, bool) /*override*/;
345
346 // vIndex: 90
347 virtual void changeDimension(::DimensionType toId) /*override*/;
348
349 // vIndex: 89
350 virtual void changeDimension(::ChangeDimensionPacket const&) /*override*/;
351
352 // vIndex: 213
353 virtual void setPlayerGameType(::GameType) /*override*/;
354
355 // vIndex: 91
356 virtual ::ActorUniqueID getControllingPlayer() const /*override*/;
357
358 // vIndex: 180
359 virtual void _fireDimensionChanged() /*override*/;
360
361 // vIndex: 189
362 virtual bool isAutoJumpEnabled() const /*override*/;
363
364 // vIndex: 169
365 virtual bool setItemSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item) /*override*/;
366
367 // vIndex: 79
368 virtual void setOffhandSlot(::ItemStack const& item) /*override*/;
369
370 // vIndex: 72
371 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) /*override*/;
372
373 // vIndex: 216
374 virtual ::IMinecraftEventing* getEventing() const /*override*/;
375
376 // vIndex: 217
377 virtual uint getUserId() const /*override*/;
378
379 // vIndex: 192
380 virtual bool isInTrialMode() /*override*/;
381
382 // vIndex: 239
383 virtual void setAbilities(::LayeredAbilities const& newAbilities) /*override*/;
384
385 // vIndex: 123
386 virtual void die(::ActorDamageSource const& source) /*override*/;
387
388 // vIndex: 107
389 virtual void onEffectRemoved(::MobEffectInstance& effect) /*override*/;
390
391 // vIndex: 218
392 virtual void addExperience(int xp) /*override*/;
393
394 // vIndex: 219
395 virtual void addLevels(int levels) /*override*/;
396
397 // vIndex: 224
398 virtual bool isActorRelevant(::Actor const&) /*override*/;
399
400 // vIndex: 69
401 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
402
403 // vIndex: 187
404 virtual void checkMovementStats(::Vec3 const&) /*override*/;
405
406 // vIndex: 188
407 virtual ::HashedString getCurrentStructureFeature() const /*override*/;
408
409 // vIndex: 225
410 virtual bool isTeacher() const /*override*/;
411
412 // vIndex: 228
413 virtual void sendInventoryTransaction(::InventoryTransaction const&) const /*override*/;
414
415 // vIndex: 229
416 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction>) const /*override*/;
417
418 // vIndex: 230
419 virtual void sendNetworkPacket(::Packet& packet) const /*override*/;
420
421 // vIndex: 231
422 virtual ::PlayerEventCoordinator& getPlayerEventCoordinator() /*override*/;
423
424 // vIndex: 125
425 virtual void applySnapshot(
426 ::EntityContext const& snapshotEntity,
427 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
428 ) /*override*/;
429
430 // vIndex: 241
431 virtual void destroyEditorPlayer() /*override*/;
432
433 // vIndex: 240
434 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const /*override*/;
435
436 // vIndex: 235
437 virtual void requestMissingSubChunk(::SubChunkPos const&) /*override*/;
438
439 // vIndex: 236
440 virtual uchar getMaxChunkBuildRadius() const /*override*/;
441
442 // vIndex: 215
443 virtual void _crit(::Actor& actor) /*override*/;
444
445 // vIndex: 135
446 virtual bool _hurt(::ActorDamageSource const&, float, bool, bool) /*override*/;
447 // NOLINTEND
448
449public:
450 // virtual function thunks
451 // NOLINTBEGIN
452
453 // NOLINTEND
454};
Definition ActorDamageSource.h:18
Definition Actor.h:103
Definition AutomaticID.h:6
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition ChalkboardBlockActor.h:24
Definition ChangeDimensionPacket.h:20
Definition ChunkPos.h:11
Definition ChunkSource.h:34
Definition ComplexInventoryTransaction.h:20
Definition CompoundTag.h:13
Definition Container.h:30
Definition DataLoadHelper.h:20
Definition Dimension.h:83
Definition EntityContext.h:16
Definition FrameUpdateContextBase.h:5
Definition HashedString.h:5
Definition IClientInstance.h:184
Definition IContainerManager.h:16
Definition IMinecraftEventing.h:145
Definition InventoryMenu.h:17
Definition InventoryTransaction.h:21
Definition ItemStack.h:25
Definition LayeredAbilities.h:18
Definition LocalPlayer.h:101
Definition LocalPlayer.h:83
Definition LocalPlayer.h:129
Definition LocalPlayer.h:71
Definition MobEffectInstance.h:15
Definition NetworkChunkSubscriber.h:13
Definition Packet.h:26
Definition PlayerAutomationObserver.h:5
Definition PlayerEventCoordinator.h:20
Definition Player.h:119
Definition SubChunkPos.h:5
Definition SubChunkRequestSubscriber.h:13
Definition TextObjectRoot.h:14
Definition Vec3.h:10
STL namespace.
Definition ActorUniqueID.h:5
Definition Brightness.h:8
Definition INpcDialogueData.h:12
Definition LocalPlayer.h:141
Definition Tick.h:5