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