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