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/certificates/identity/PlayerAuthenticationType.h"
7#include "mc/common/Brightness.h"
8#include "mc/common/SubClientId.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/EquipmentSlot.h"
16#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
17#include "mc/events/OpenCodeMethod.h"
18#include "mc/network/packet/PlayerRespawnState.h"
19#include "mc/platform/UUID.h"
20#include "mc/platform/diagnostics/CrashDumpLogStringID.h"
21#include "mc/world/actor/ActorEvent.h"
22#include "mc/world/actor/ActorInitializationMethod.h"
23#include "mc/world/actor/ActorResetRule.h"
24#include "mc/world/actor/ActorSwingSource.h"
25#include "mc/world/actor/bhave/BehaviorStatus.h"
26#include "mc/world/actor/player/BedSleepingResult.h"
27#include "mc/world/actor/player/Player.h"
28#include "mc/world/containers/ContainerEnumName.h"
29#include "mc/world/inventory/InventoryMenu.h"
30#include "mc/world/inventory/network/TypedClientNetId.h"
31#include "mc/world/item/ItemStack.h"
32#include "mc/world/level/BlockPos.h"
33#include "mc/world/level/GameType.h"
34#include "mc/world/level/chunk/NetworkChunkSubscriber.h"
35
36// auto generated forward declare list
37// clang-format off
38class Actor;
40class BlockActor;
41class BlockSource;
44class ChunkPos;
45class ChunkSource;
47class CompoundTag;
48class Container;
49class DataLoadHelper;
50class Dimension;
51class EntityContext;
52class HitResult;
53class IClientInstance;
60class Level;
63class Packet;
64class PacketSender;
66class SubChunkPos;
68class TextObjectRoot;
69class Vec2;
70struct ActorUniqueID;
73struct INpcDialogueData;
74struct InventoryOptions;
78struct Tick;
79namespace Bedrock::DDUI { class DataStoreSyncClient; }
80namespace Editor { class IEditorManager; }
81namespace Editor { class IEditorPlayer; }
82namespace MovementDataExtractionUtility { class SnapshotAccessor; }
83// clang-format on
84
85class LocalPlayer : public ::Player {
86public:
87 // LocalPlayer inner types declare
88 // clang-format off
89 class RegionListener;
93 struct ContainerCloseInfo;
94 // clang-format on
95
96 // LocalPlayer inner types define
97 class RegionListener {
98 public:
99 // virtual functions
100 // NOLINTBEGIN
101 virtual ~RegionListener();
102
103 virtual void onRegionDestroyed() = 0;
104 // NOLINTEND
105
106 public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCFOLD void $dtor();
110 // NOLINTEND
111
112 public:
113 // virtual function thunks
114 // NOLINTBEGIN
115
116 // NOLINTEND
117
118 public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123 };
124
125 class EmoteExpediateData {
126 public:
127 // member variables
128 // NOLINTBEGIN
129 ::ll::TypedStorage<8, 8, int64> mEmoteButtonDownStartTime;
130 ::ll::TypedStorage<1, 1, bool> mIsExpediateSelectionActive;
131 // NOLINTEND
132 };
133
134 class FellFromWorldHeightAchievementTracker {
135 public:
136 // FellFromWorldHeightAchievementTracker inner types define
137 enum class FallState : uchar {
138 Falling = 0,
139 TickCheckAliveTicks = 1,
140 CheckForAlive = 2,
141 Done = 3,
142 };
143
144 public:
145 // member variables
146 // NOLINTBEGIN
147 ::ll::TypedStorage<1, 1, ::LocalPlayer::FellFromWorldHeightAchievementTracker::FallState> mState;
148 ::ll::TypedStorage<4, 4, int> mCheckAliveTicks;
149 ::ll::TypedStorage<1, 1, bool> mHasSentAchievement;
150 // NOLINTEND
151 };
152
154 public:
155 // member variables
156 // NOLINTBEGIN
157 ::ll::TypedStorage<1, 1, bool> mIsUndergroundCurrentTick;
158 ::ll::TypedStorage<1, 1, bool> mWasUndergroundPreviousTick;
159 ::ll::TypedStorage<1, 1, bool> mForceInitialEventingPropertyUpdate;
160 ::ll::TypedStorage<4, 12, ::BlockPos> mPreviousBlockPos;
161 ::ll::TypedStorage<1, 1, ::Brightness> mPreviousNaturalLightLevel;
162 // NOLINTEND
163
164 public:
165 // member functions
166 // NOLINTBEGIN
167 MCAPI void tick(::LocalPlayer& owner);
168 // NOLINTEND
169 };
170
171 struct ContainerCloseInfo {
172 public:
173 // member variables
174 // NOLINTBEGIN
175 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::ContainerType> mContainerTypeToClose;
176 ::ll::TypedStorage<1, 1, bool> mShouldCloseContainerScreen;
177 // NOLINTEND
178 };
179
180public:
181 // member variables
182 // NOLINTBEGIN
183 ::ll::TypedStorage<8, 112, ::InventoryMenu> mInventoryMenu;
184 ::ll::TypedStorage<4, 4, float> mPortalEffectTime;
185 ::ll::TypedStorage<4, 4, float> mOPortalEffectTime;
186 ::ll::TypedStorage<8, 16, ::LocalPlayer::EmoteExpediateData> mEmoteExpediateData;
187 ::ll::TypedStorage<4, 20, ::LocalPlayer::UndergroundTelemetryHeuristic> mUndergroundTelemetryHeuristic;
188 ::ll::TypedStorage<4, 12, ::LocalPlayer::FellFromWorldHeightAchievementTracker>
189 mFellFromWorldHeightAchievementTracker;
190 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mLowMemorySubscription;
191 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
192 ::ll::TypedStorage<4, 4, int> mCanCloseScreenOnHurtAfterTime;
193 ::ll::TypedStorage<4, 12, ::Vec3> mlastFrameDelta;
194 ::ll::TypedStorage<1, 1, bool> mEnablePortalEffect;
195 ::ll::TypedStorage<8, 152, ::ItemStack> mSentOffhandItem;
196 ::ll::TypedStorage<8, 152, ::ItemStack> mSentInventoryItem;
197 ::ll::TypedStorage<4, 4, int> mSentSelectedSlot;
198 ::ll::TypedStorage<1, 2, ::LocalPlayer::ContainerCloseInfo> mContainerCloseInfo;
199 ::ll::TypedStorage<8, 8, uint64> mSessionTickCount;
200 ::ll::TypedStorage<8, 24, ::std::vector<::LocalPlayer::RegionListener*>> mRegionListeners;
201 ::ll::TypedStorage<1, 1, bool> mDamagedByMobThisFrame;
202 ::ll::TypedStorage<1, 1, bool> mIsTeacher;
203 ::ll::TypedStorage<1, 1, bool> mHasBeenInitialized;
204 ::ll::TypedStorage<1, 1, bool> mPrevTransitionBlocking;
205 ::ll::TypedStorage<8, 32, ::std::string> mInventorySearchString;
206 ::ll::TypedStorage<8, 64, ::std::unordered_set<::mce::UUID>> mAllSentEmotePieceIds;
207 ::ll::TypedStorage<8, 48, ::HashedString> mCurrentStructureFeature;
208 ::ll::TypedStorage<8, 152, ::ItemStack> mItemActivationItem;
209 ::ll::TypedStorage<4, 4, int> mItemActivationTicks;
210 ::ll::TypedStorage<4, 4, float> mItemActivationOffsetX;
211 ::ll::TypedStorage<4, 4, float> mItemActivationOffsetY;
212 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerAutomationObserver>> mAutomationObserver;
213 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkRequestSubscriber>> mSubChunkSubscriber;
214 ::ll::TypedStorage<4, 4, uint> mTickingAreaChunkIndexToCheckForRequests;
215 ::ll::TypedStorage<8, 32, ::NetworkChunkSubscriber> mChunkSubscriberView;
216 ::ll::TypedStorage<1, 1, ::PlayerRespawnState> mClientRespawnState;
217 ::ll::TypedStorage<4, 12, ::Vec3> mClientRespawnPotentialPosition;
218 ::ll::TypedStorage<4, 4, int> mRenderChunkRadiusLowMemoryWatermark;
219 ::ll::TypedStorage<8, 32, ::std::string> mLastDeathInfo;
220 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorPlayer>> mEditorClientPlayer;
221 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Bedrock::DDUI::DataStoreSyncClient>> mDataStoreSync;
222 ::ll::TypedStorage<4, 4, float> mCurrentExpCache;
223 ::ll::TypedStorage<4, 4, int> mCurrentLevelCache;
224 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastLevelChangedTimePoint;
225 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastXPContainerClosedTimePoint;
226 ::ll::TypedStorage<1, 1, bool> mPreparedMainChunkSource;
227 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mVisibleTouchJoystickLockSubscription;
228 // NOLINTEND
229
230public:
231 // prevent constructor by default
232 LocalPlayer& operator=(LocalPlayer const&);
233 LocalPlayer(LocalPlayer const&);
234 LocalPlayer();
235
236public:
237 // virtual functions
238 // NOLINTBEGIN
239 virtual ~LocalPlayer() /*override*/;
240
241 virtual void reloadHardcodedClient(::ActorInitializationMethod method) /*override*/;
242
243 virtual void prepareRegion(::ChunkSource& mainChunkSource) /*override*/;
244
245 virtual void suspendRegion() /*override*/;
246
247 virtual void destroyRegion() /*override*/;
248
249 virtual void tickWorld(::Tick const& currentTick) /*override*/;
250
251 virtual void frameUpdate(::FrameUpdateContextBase& frameUpdateContextBase) /*override*/;
252
253 virtual ::std::vector<::ChunkPos> const& getTickingOffsets() const /*override*/;
254
255 virtual void normalTick() /*override*/;
256
257 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
258
259 virtual void aiStep() /*override*/;
260
261 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
262
263 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
264
265 virtual void deleteContainerManager() /*override*/;
266
267 virtual void openPortfolio() /*override*/;
268
269 virtual void openBook(int bookSlot, bool editable, int page, ::BlockActor* lectern) /*override*/;
270
271 virtual void openChalkboard(::ChalkboardBlockActor& chalkboard, bool showLockToggle) /*override*/;
272
273 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> data) /*override*/;
274
275 virtual void openTrading(::ActorUniqueID const& uniqueID, bool useNewScreen) /*override*/;
276
277 virtual void openInventory() /*override*/;
278
279 virtual void setContainerData(::IContainerManager& menu, int id, int value) /*override*/;
280
281 virtual void slotChanged(
282 ::IContainerManager& menu,
283 ::Container& container,
284 int slot,
285 ::ItemStack const& oldItem,
286 ::ItemStack const& newItem,
287 bool isResultSlot
288 ) /*override*/;
289
290 virtual void refreshContainer(::IContainerManager& menu) /*override*/;
291
292 virtual bool isLoading() const /*override*/;
293
294 virtual void stopLoading() /*override*/;
295
296 virtual void respawn() /*override*/;
297
298 virtual void displayClientMessage(
299 ::std::string const& message,
300 ::std::optional<::std::string> const filteredMessage
301 ) /*override*/;
302
303 virtual void displayTextObjectMessage(
304 ::TextObjectRoot const& textObject,
305 ::std::string const& fromXuid,
306 ::std::string const& fromPlatformId
307 ) /*override*/;
308
309 virtual void displayWhisperMessage(
310 ::std::string const& author,
311 ::std::string const& message,
312 ::std::optional<::std::string> const filteredMessage,
313 ::std::string const& xuid,
314 ::std::string const& platformId
315 ) /*override*/;
316
317 virtual ::BedSleepingResult startSleepInBed(::BlockPos const& bedBlockPos) /*override*/;
318
319 virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList) /*override*/;
320
321 virtual bool canStartSleepInBed() /*override*/;
322
323 virtual void handleInsidePortal(::BlockPos const& portalPos) /*override*/;
324
325 virtual bool swing(::ActorSwingSource swingSource) /*override*/;
326
327 virtual void setSneaking(bool value) /*override*/;
328
329 virtual void setSprinting(bool shouldSprint) /*override*/;
330
331 virtual void playEmote(::std::string const& pieceId, bool const playChatMessage) /*override*/;
332
333 virtual void resetRot() /*override*/;
334
335 virtual void resetUserPos(::ActorResetRule resetRule) /*override*/;
336
337 virtual void teleportTo(
338 ::Vec3 const& pos,
339 bool shouldStopRiding,
340 int cause,
341 int sourceEntityType,
342 bool keepVelocity
343 ) /*override*/;
344
345 virtual void changeDimension(::DimensionType toId) /*override*/;
346
347 virtual void changeDimension(::ChangeDimensionPacket const& packet) /*override*/;
348
349 virtual void setPlayerGameType(::GameType gameType) /*override*/;
350
351 virtual ::ActorUniqueID getControllingPlayer() const /*override*/;
352
353 virtual void _fireDimensionChanged() /*override*/;
354
355 virtual bool isAutoJumpEnabled() const /*override*/;
356
357 virtual bool setItemSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item) /*override*/;
358
359 virtual void setOffhandSlot(::ItemStack const& item) /*override*/;
360
361 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) /*override*/;
362
363 virtual ::IMinecraftEventing* getEventing() const /*override*/;
364
365 virtual uint getUserId() const /*override*/;
366
367 virtual bool isInTrialMode() /*override*/;
368
369 virtual void setAbilities(::LayeredAbilities const& newAbilities) /*override*/;
370
371 virtual void die(::ActorDamageSource const& source) /*override*/;
372
373 virtual void onEffectRemoved(::MobEffectInstance& effect) /*override*/;
374
375 virtual void addExperience(int xp) /*override*/;
376
377 virtual void addLevels(int levels) /*override*/;
378
379 virtual bool isActorRelevant(::Actor const& actor) /*override*/;
380
381 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
382
383 virtual void checkMovementStats(::Vec3 const& d) /*override*/;
384
385 virtual ::HashedString getCurrentStructureFeature() const /*override*/;
386
387 virtual bool isTeacher() const /*override*/;
388
389 virtual void sendInventoryTransaction(::InventoryTransaction const& transaction) const /*override*/;
390
391 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction> transaction) const
392 /*override*/;
393
394 virtual void sendNetworkPacket(::Packet& packet) const /*override*/;
395
396 virtual ::PlayerEventCoordinator& getPlayerEventCoordinator() /*override*/;
397
398 virtual void applySnapshot(
399 ::EntityContext const& snapshotEntity,
400 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
401 ) /*override*/;
402
403 virtual void destroyEditorPlayer() /*override*/;
404
405 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const /*override*/;
406
407 virtual void requestMissingSubChunk(::SubChunkPos const& scp) /*override*/;
408
409 virtual uchar getMaxChunkBuildRadius() const /*override*/;
410
411 virtual void setBehaviorCommandStatus(::std::string const&, ::BehaviorStatus) /*override*/;
412
413 virtual ::std::unique_ptr<::ISparseContainerSetListener> createSparseContainerListener() /*override*/;
414
415 virtual void emitCriticalHitParticles(::Actor const& target, int particleCount) /*override*/;
416
417 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
418 // NOLINTEND
419
420public:
421 // member functions
422 // NOLINTBEGIN
423 MCAPI LocalPlayer(
424 ::IClientInstance& client,
425 ::Level& level,
426 ::std::string const& playerName,
427 ::GameType playerGameType,
428 bool isHostingPlayer,
429 ::NetworkIdentifier const& owner,
430 ::SubClientId subid,
431 ::mce::UUID uuid,
432 ::std::string const& deviceId,
433 ::PlayerAuthenticationType authType,
434 ::PlayerAuthenticationInfo const& authInfo,
435 ::EntityContext& entityContext
436 );
437
438 MCAPI void _applyTurnDelta(::Vec2 const& turnOffset);
439
440 MCAPI void _checkForTickingAreaSubchunkRequests();
441
442 MCAPI void _forceCameraCut();
443
444 MCAPI void _handleDebugTracking();
445
446 MCAPI void _logCDEvent(
447 ::CrashDumpLogStringID option1,
448 ::CrashDumpLogStringID option2,
449 ::CrashDumpLogStringID option3,
450 ::CrashDumpLogStringID option4
451 );
452
453 MCAPI void _prepareMainChunkSource(::ChunkPos const& center);
454
455 MCAPI void createEditorPlayer(::Bedrock::NonOwnerPointer<::Editor::IEditorManager> editorManager);
456
457 MCAPI void fireEventPersonaEmotePlayed(bool emoteEndedEarly);
458
459 MCAPI float getFieldOfViewModifier() const;
460
461 MCAPI float getPickRange() const;
462
463 MCAPI void handleArmorDamage(::ArmorSlotAndDamagePair const& armorSlotAndDamage);
464
465 MCAPI void hurtTo(int newHealth);
466
467 MCAPI void localPlayerTurn(::Vec2 const& deltaRot);
468
469 MCAPI void markUIAnimationComponentDirty();
470
471 MCAPI void openCodeScreen(::OpenCodeMethod openMethod);
472
473 MCAPI void pickBlock(::HitResult const& hitResult, bool withData);
474
475 MCAPI void pushChangeDimensionLoadingScreen(::DimensionType toId);
476
477 MCAPI void requestChunkRadius(uint chunkRadius);
478
479 MCAPI void sendBlockPickRequestPacket(::BlockSource& region, ::BlockPos const& hitResultBlockPos, bool withData);
480
481 MCAPI void sendEmotes();
482
483 MCAPI void setAllEmotePlayedTelemetryData(::std::string const& emoteProductId, int emoteSlotNumber);
484
485 MCAPI void setAndSaveInventoryOptions(::InventoryOptions const& options);
486
487 MCAPI void setPlayerGameTypeWithoutServerNotification(::GameType gameType);
488 // NOLINTEND
489
490public:
491 // static functions
492 // NOLINTBEGIN
493 MCAPI static void _populateLegacyTransactionRequest(
494 ::ItemStackLegacyRequestId& legacyRequestId,
495 ::std::vector<::std::pair<::ContainerEnumName, ::std::vector<uchar>>>& legacySetItemSlots,
496 ::ItemStackNetManagerClient const& itemStackNetManager
497 );
498
499 MCAPI static void sendInput(::EntityContext& entity, ::PacketSender& packetSender);
500
501 MCAPI static ::LocalPlayer* tryGetFromEntity(::EntityContext& entity, bool includeRemoved);
502 // NOLINTEND
503
504public:
505 // static variables
506 // NOLINTBEGIN
507 MCAPI static ::std::chrono::nanoseconds const& MAX_DIMENSION_LOAD_IN_TIME();
508 // NOLINTEND
509
510public:
511 // constructor thunks
512 // NOLINTBEGIN
513 MCAPI void* $ctor(
514 ::IClientInstance& client,
515 ::Level& level,
516 ::std::string const& playerName,
517 ::GameType playerGameType,
518 bool isHostingPlayer,
519 ::NetworkIdentifier const& owner,
520 ::SubClientId subid,
521 ::mce::UUID uuid,
522 ::std::string const& deviceId,
523 ::PlayerAuthenticationType authType,
524 ::PlayerAuthenticationInfo const& authInfo,
525 ::EntityContext& entityContext
526 );
527 // NOLINTEND
528
529public:
530 // destructor thunk
531 // NOLINTBEGIN
532 MCAPI void $dtor();
533 // NOLINTEND
534
535public:
536 // virtual function thunks
537 // NOLINTBEGIN
538 MCAPI void $reloadHardcodedClient(::ActorInitializationMethod method);
539
540 MCAPI void $prepareRegion(::ChunkSource& mainChunkSource);
541
542 MCAPI void $suspendRegion();
543
544 MCAPI void $destroyRegion();
545
546 MCAPI void $tickWorld(::Tick const& currentTick);
547
548 MCFOLD void $frameUpdate(::FrameUpdateContextBase& frameUpdateContextBase);
549
550 MCAPI ::std::vector<::ChunkPos> const& $getTickingOffsets() const;
551
552 MCAPI void $normalTick();
553
554 MCAPI bool $startRiding(::Actor& vehicle, bool forceRiding);
555
556 MCAPI void $aiStep();
557
558 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
559
560 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
561
562 MCAPI void $deleteContainerManager();
563
564 MCAPI void $openPortfolio();
565
566 MCAPI void $openBook(int bookSlot, bool editable, int page, ::BlockActor* lectern);
567
568 MCAPI void $openChalkboard(::ChalkboardBlockActor& chalkboard, bool showLockToggle);
569
570 MCAPI void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> data);
571
572 MCAPI void $openTrading(::ActorUniqueID const& uniqueID, bool useNewScreen);
573
574 MCAPI void $openInventory();
575
576 MCFOLD void $setContainerData(::IContainerManager& menu, int id, int value);
577
578 MCAPI void $slotChanged(
579 ::IContainerManager& menu,
580 ::Container& container,
581 int slot,
582 ::ItemStack const& oldItem,
583 ::ItemStack const& newItem,
584 bool isResultSlot
585 );
586
587 MCFOLD void $refreshContainer(::IContainerManager& menu);
588
589 MCAPI bool $isLoading() const;
590
591 MCAPI void $stopLoading();
592
593 MCAPI void $respawn();
594
595 MCAPI void
596 $displayClientMessage(::std::string const& message, ::std::optional<::std::string> const filteredMessage);
597
598 MCAPI void $displayTextObjectMessage(
599 ::TextObjectRoot const& textObject,
600 ::std::string const& fromXuid,
601 ::std::string const& fromPlatformId
602 );
603
604 MCAPI void $displayWhisperMessage(
605 ::std::string const& author,
606 ::std::string const& message,
607 ::std::optional<::std::string> const filteredMessage,
608 ::std::string const& xuid,
609 ::std::string const& platformId
610 );
611
612 MCAPI ::BedSleepingResult $startSleepInBed(::BlockPos const& bedBlockPos);
613
614 MCAPI void $stopSleepInBed(bool forcefulWakeUp, bool updateLevelList);
615
616 MCAPI bool $canStartSleepInBed();
617
618 MCAPI void $handleInsidePortal(::BlockPos const& portalPos);
619
620 MCAPI bool $swing(::ActorSwingSource swingSource);
621
622 MCAPI void $setSneaking(bool value);
623
624 MCAPI void $setSprinting(bool shouldSprint);
625
626 MCAPI void $playEmote(::std::string const& pieceId, bool const playChatMessage);
627
628 MCAPI void $resetRot();
629
630 MCAPI void $resetUserPos(::ActorResetRule resetRule);
631
632 MCAPI void
633 $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int sourceEntityType, bool keepVelocity);
634
635 MCFOLD void $changeDimension(::DimensionType toId);
636
637 MCAPI void $changeDimension(::ChangeDimensionPacket const& packet);
638
639 MCAPI void $setPlayerGameType(::GameType gameType);
640
641 MCFOLD ::ActorUniqueID $getControllingPlayer() const;
642
643 MCAPI void $_fireDimensionChanged();
644
645 MCAPI bool $isAutoJumpEnabled() const;
646
647 MCFOLD bool $setItemSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item);
648
649 MCAPI void $setOffhandSlot(::ItemStack const& item);
650
651 MCAPI void $setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item);
652
653 MCAPI ::IMinecraftEventing* $getEventing() const;
654
655 MCAPI uint $getUserId() const;
656
657 MCAPI bool $isInTrialMode();
658
659 MCAPI void $setAbilities(::LayeredAbilities const& newAbilities);
660
661 MCAPI void $die(::ActorDamageSource const& source);
662
663 MCAPI void $onEffectRemoved(::MobEffectInstance& effect);
664
665 MCFOLD void $addExperience(int xp);
666
667 MCFOLD void $addLevels(int levels);
668
669 MCFOLD bool $isActorRelevant(::Actor const& actor);
670
671 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
672
673 MCAPI void $checkMovementStats(::Vec3 const& d);
674
675 MCAPI ::HashedString $getCurrentStructureFeature() const;
676
677 MCAPI bool $isTeacher() const;
678
679 MCAPI void $sendInventoryTransaction(::InventoryTransaction const& transaction) const;
680
681 MCAPI void $sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction> transaction) const;
682
683 MCAPI void $sendNetworkPacket(::Packet& packet) const;
684
685 MCAPI ::PlayerEventCoordinator& $getPlayerEventCoordinator();
686
687 MCAPI void $applySnapshot(
688 ::EntityContext const& snapshotEntity,
689 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
690 );
691
692 MCAPI void $destroyEditorPlayer();
693
694 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> $getEditorPlayer() const;
695
696 MCAPI void $requestMissingSubChunk(::SubChunkPos const& scp);
697
698 MCAPI uchar $getMaxChunkBuildRadius() const;
699
700 MCAPI ::std::unique_ptr<::ISparseContainerSetListener> $createSparseContainerListener();
701
702 MCAPI void $emitCriticalHitParticles(::Actor const& target, int particleCount);
703
704 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
705 // NOLINTEND
706
707public:
708 // vftables
709 // NOLINTBEGIN
710 MCNAPI static void** $vftable();
711 // NOLINTEND
712};
Definition ActorDamageSource.h:18
Definition Actor.h:105
Definition DataStoreSyncClient.h:15
Definition BlockActor.h:32
Definition BlockSource.h:68
Definition ChalkboardBlockActor.h:24
Definition ChangeDimensionPacket.h:19
Definition ChunkPos.h:11
Definition ChunkSource.h:37
Definition ComplexInventoryTransaction.h:19
Definition CompoundTag.h:23
Definition Container.h:33
Definition DataLoadHelper.h:20
Definition Dimension.h:85
Definition IEditorManager.h:25
Definition IEditorPlayer.h:16
Definition EntityContext.h:16
Definition HitResult.h:17
Definition IClientInstance.h:5
Definition IContainerManager.h:16
Definition IMinecraftEventing.h:137
Definition ISparseContainerSetListener.h:11
Definition InventoryTransaction.h:21
Definition ItemStackNetManagerClient.h:38
Definition LayeredAbilities.h:19
Definition Level.h:249
Definition LocalPlayer.h:19
Definition LocalPlayer.h:17
static MCAPI void ** $vftable()
Definition LocalPlayer.h:5
static MCAPI void ** $vftable()
Definition MobEffectInstance.h:15
Definition SnapshotAccessor.h:12
Definition NetworkIdentifier.h:10
Definition PacketSender.h:17
Definition Packet.h:28
Definition PlayerEventCoordinator.h:22
Definition Player.h:125
Definition SubChunkPos.h:5
Definition SubChunkRequestSubscriber.h:13
Definition TextObjectRoot.h:14
Definition Vec2.h:5
Definition ActorUniqueID.h:5
Definition ArmorSlotAndDamagePair.h:8
Definition FrameUpdateContextBase.h:5
Definition INpcDialogueData.h:12
Definition InventoryOptions.h:10
Definition ItemStackLegacyRequestIdTag.h:5
Definition LocalPlayer.h:29
Definition PlayerAuthenticationInfo.h:8
Definition PlayerAutomationObserver.h:5
Definition Tick.h:5