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<8, 8, ::std::chrono::steady_clock::time_point> mLastXPContainerClosedTimePoint;
201 ::ll::TypedStorage<1, 1, bool> mPreparedMainChunkSource;
202 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mVisibleTouchJoystickLockSubscription;
203 // NOLINTEND
204
205public:
206 // prevent constructor by default
207 LocalPlayer& operator=(LocalPlayer const&);
208 LocalPlayer(LocalPlayer const&);
209 LocalPlayer();
210
211public:
212 // virtual functions
213 // NOLINTBEGIN
214 // vIndex: 0
215 virtual ~LocalPlayer() /*override*/ = default;
216
217 // vIndex: 3
218 virtual void reloadHardcodedClient(::ActorInitializationMethod) /*override*/;
219
220 // vIndex: 177
221 virtual void prepareRegion(::ChunkSource& mainChunkSource) /*override*/;
222
223 // vIndex: 179
224 virtual void suspendRegion() /*override*/;
225
226 // vIndex: 178
227 virtual void destroyRegion() /*override*/;
228
229 // vIndex: 182
230 virtual void tickWorld(::Tick const&) /*override*/;
231
232 // vIndex: 183
233 virtual void frameUpdate(::FrameUpdateContextBase&) /*override*/;
234
235 // vIndex: 184
236 virtual ::std::vector<::ChunkPos> const& getTickingOffsets() const /*override*/;
237
238 // vIndex: 24
239 virtual void normalTick() /*override*/;
240
241 // vIndex: 27
242 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
243
244 // vIndex: 145
245 virtual void aiStep() /*override*/;
246
247 // vIndex: 137
248 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
249
250 // vIndex: 136
251 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
252
253 // vIndex: 223
254 virtual void deleteContainerManager() /*override*/;
255
256 // vIndex: 193
257 virtual void openPortfolio() /*override*/;
258
259 // vIndex: 194
260 virtual void openBook(int, bool, int, ::BlockActor*) /*override*/;
261
262 // vIndex: 196
263 virtual void openChalkboard(::ChalkboardBlockActor&, bool) /*override*/;
264
265 // vIndex: 197
266 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc) /*override*/;
267
268 // vIndex: 195
269 virtual void openTrading(::ActorUniqueID const&, bool) /*override*/;
270
271 // vIndex: 198
272 virtual void openInventory() /*override*/;
273
274 // vIndex: 220
275 virtual void setContainerData(::IContainerManager&, int, int) /*override*/;
276
277 // vIndex: 221
278 virtual void
279 slotChanged(::IContainerManager&, ::Container&, int, ::ItemStack const&, ::ItemStack const&, bool) /*override*/;
280
281 // vIndex: 222
282 virtual void refreshContainer(::IContainerManager&) /*override*/;
283
284 // vIndex: 210
285 virtual bool isLoading() const /*override*/;
286
287 // vIndex: 212
288 virtual void stopLoading() /*override*/;
289
290 // vIndex: 190
291 virtual void respawn() /*override*/;
292
293 // vIndex: 200
294 virtual void displayClientMessage(
295 ::std::string const& message,
296 ::std::optional<::std::string> const filteredMessage
297 ) /*override*/;
298
299 // vIndex: 201
300 virtual void displayTextObjectMessage(
301 ::TextObjectRoot const& textObject,
302 ::std::string const& fromXuid,
303 ::std::string const& fromPlatformId
304 ) /*override*/;
305
306 // vIndex: 204
307 virtual void displayWhisperMessage(
308 ::std::string const& author,
309 ::std::string const& message,
310 ::std::optional<::std::string> const filteredMessage,
311 ::std::string const& xuid,
312 ::std::string const& platformId
313 ) /*override*/;
314
315 // vIndex: 205
316 virtual ::BedSleepingResult startSleepInBed(::BlockPos const& bedBlockPos) /*override*/;
317
318 // vIndex: 206
319 virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList) /*override*/;
320
321 // vIndex: 207
322 virtual bool canStartSleepInBed() /*override*/;
323
324 // vIndex: 87
325 virtual void handleInsidePortal(::BlockPos const& portalPos) /*override*/;
326
327 // vIndex: 111
328 virtual void swing() /*override*/;
329
330 // vIndex: 44
331 virtual void setSneaking(bool value) /*override*/;
332
333 // vIndex: 140
334 virtual void setSprinting(bool shouldSprint) /*override*/;
335
336 // vIndex: 209
337 virtual void playEmote(::std::string const&, bool const) /*override*/;
338
339 // vIndex: 191
340 virtual void resetRot() /*override*/;
341
342 // vIndex: 9
343 virtual void resetUserPos(::ActorResetRule) /*override*/;
344
345 // vIndex: 21
346 virtual void teleportTo(::Vec3 const&, bool, int, int, bool) /*override*/;
347
348 // vIndex: 90
349 virtual void changeDimension(::DimensionType toId) /*override*/;
350
351 // vIndex: 89
352 virtual void changeDimension(::ChangeDimensionPacket const&) /*override*/;
353
354 // vIndex: 213
355 virtual void setPlayerGameType(::GameType) /*override*/;
356
357 // vIndex: 91
358 virtual ::ActorUniqueID getControllingPlayer() const /*override*/;
359
360 // vIndex: 180
361 virtual void _fireDimensionChanged() /*override*/;
362
363 // vIndex: 189
364 virtual bool isAutoJumpEnabled() const /*override*/;
365
366 // vIndex: 169
367 virtual bool setItemSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item) /*override*/;
368
369 // vIndex: 79
370 virtual void setOffhandSlot(::ItemStack const& item) /*override*/;
371
372 // vIndex: 72
373 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) /*override*/;
374
375 // vIndex: 216
376 virtual ::IMinecraftEventing* getEventing() const /*override*/;
377
378 // vIndex: 217
379 virtual uint getUserId() const /*override*/;
380
381 // vIndex: 192
382 virtual bool isInTrialMode() /*override*/;
383
384 // vIndex: 239
385 virtual void setAbilities(::LayeredAbilities const& newAbilities) /*override*/;
386
387 // vIndex: 123
388 virtual void die(::ActorDamageSource const& source) /*override*/;
389
390 // vIndex: 107
391 virtual void onEffectRemoved(::MobEffectInstance& effect) /*override*/;
392
393 // vIndex: 218
394 virtual void addExperience(int xp) /*override*/;
395
396 // vIndex: 219
397 virtual void addLevels(int levels) /*override*/;
398
399 // vIndex: 224
400 virtual bool isActorRelevant(::Actor const&) /*override*/;
401
402 // vIndex: 69
403 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
404
405 // vIndex: 187
406 virtual void checkMovementStats(::Vec3 const&) /*override*/;
407
408 // vIndex: 188
409 virtual ::HashedString getCurrentStructureFeature() const /*override*/;
410
411 // vIndex: 225
412 virtual bool isTeacher() const /*override*/;
413
414 // vIndex: 228
415 virtual void sendInventoryTransaction(::InventoryTransaction const&) const /*override*/;
416
417 // vIndex: 229
418 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction>) const /*override*/;
419
420 // vIndex: 230
421 virtual void sendNetworkPacket(::Packet& packet) const /*override*/;
422
423 // vIndex: 231
424 virtual ::PlayerEventCoordinator& getPlayerEventCoordinator() /*override*/;
425
426 // vIndex: 125
427 virtual void applySnapshot(
428 ::EntityContext const& snapshotEntity,
429 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
430 ) /*override*/;
431
432 // vIndex: 241
433 virtual void destroyEditorPlayer() /*override*/;
434
435 // vIndex: 240
436 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const /*override*/;
437
438 // vIndex: 235
439 virtual void requestMissingSubChunk(::SubChunkPos const&) /*override*/;
440
441 // vIndex: 236
442 virtual uchar getMaxChunkBuildRadius() const /*override*/;
443
444 // vIndex: 215
445 virtual void _crit(::Actor& actor) /*override*/;
446
447 // vIndex: 135
448 virtual bool _hurt(::ActorDamageSource const&, float, bool, bool) /*override*/;
449 // NOLINTEND
450
451public:
452 // virtual function thunks
453 // NOLINTBEGIN
454
455 // NOLINTEND
456};
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:189
Definition IContainerManager.h:16
Definition IMinecraftEventing.h:144
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:120
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