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