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