LeviLamina
Loading...
Searching...
No Matches
PlayerLocationSender.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/core/utility/AutomaticID.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/platform/brstd/flat_map.h"
10
11// auto generated forward declare list
12// clang-format off
13class Dimension;
14class PacketSender;
15class Player;
17class WeakEntityRef;
18struct ActorUniqueID;
19// clang-format on
20
22public:
23 // PlayerLocationSender inner types declare
24 // clang-format off
27 struct PlayerLocationData;
28 // clang-format on
29
30 // PlayerLocationSender inner types define
32
34
36 public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<4, 16, ::std::optional<::Vec3>> mPosition;
40 ::ll::TypedStorage<4, 4, ::DimensionType> mDimension;
41 ::ll::TypedStorage<1, 1, bool> mIsSpectator;
42 // NOLINTEND
43 };
44
45 using OptionalPosition = ::std::optional<::Vec3>;
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<
51 8,
52 56,
57 ::std::vector<::ActorUniqueID>,
58 ::std::vector<::PlayerLocationSender::PlayerLocationData>>>
59 mCurrentPlayerLocationData;
60 ::ll::TypedStorage<
61 8,
62 56,
64 ::std::pair<::ActorUniqueID, ::ActorUniqueID>,
65 ::std::optional<::Vec3>,
67 ::std::vector<::std::pair<::ActorUniqueID, ::ActorUniqueID>>,
68 ::std::vector<::std::optional<::Vec3>>>>
69 mSentPlayerData;
70 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::PacketSender>> mPacketSender;
71 ::ll::TypedStorage<4, 4, float> mSimulationDistance;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI void _checkPlayerPairAndMaybeSendPacket(
78 ::UserEntityIdentifierComponent const& userIdentifier,
79 ::Player const& viewingPlayer,
80 ::Player const& observedPlayer
81 );
82
83 MCAPI void _forEachClientPlayerPair(
84 ::std::vector<::WeakEntityRef> const& gameplayUsers,
85 ::std::function<void(::UserEntityIdentifierComponent const&, ::Player const&, ::Player const&)> action
86 );
87
88 MCAPI bool _shouldSendPositionPacket(
89 ::Vec3 const& viewingPlayerPosition,
90 ::DimensionType const& viewingPlayerDimension,
91 bool viewingPlayerIsSpectator,
92 ::std::optional<::Vec3> const& observedPlayerPosPrev,
93 ::PlayerLocationSender::PlayerLocationData const& observedPlayerPositionNew
94 ) const;
95
96 MCAPI void _updatePlayerData(::Player const& player);
97
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104 MCAPI static ::PlayerLocationSender::PlayerLocationData const& NULL_PLAYER_LOCATION_DATA();
105 // NOLINTEND
106
107public:
108 // destructor thunk
109 // NOLINTBEGIN
110 MCAPI void $dtor();
111 // NOLINTEND
112};
Definition Dimension.h:85
Definition PacketSender.h:17
Definition PlayerLocationSender.h:21
Definition Player.h:125
Definition UserEntityIdentifierComponent.h:12
Definition Vec3.h:10
Definition WeakEntityRef.h:14
Definition flat_map.h:8
Definition ActorUniqueID.h:5
Definition PlayerLocationSender.h:31
Definition PlayerLocationSender.h:33
Definition PlayerLocationSender.h:35