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 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 16, ::std::optional<::Vec3>> mPosition;
36 ::ll::TypedStorage<4, 4, ::DimensionType> mDimension;
37 ::ll::TypedStorage<1, 1, bool> mIsSpectator;
38 // NOLINTEND
39 };
40
41 using OptionalPosition = ::std::optional<::Vec3>;
42
44
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
98 MCAPI void removePlayerData(::ActorUniqueID const& playerID);
99
100 MCAPI void updatePlayersData(::std::vector<::WeakEntityRef> const& gameplayUsers);
101
102 MCAPI ~PlayerLocationSender();
103 // NOLINTEND
104
105public:
106 // static variables
107 // NOLINTBEGIN
108 MCAPI static ::PlayerLocationSender::PlayerLocationData const& NULL_PLAYER_LOCATION_DATA();
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116};
Definition AutomaticID.h:6
Definition Dimension.h:83
Definition PacketSender.h:17
Definition PlayerLocationSender.h:21
Definition Player.h:123
Definition UserEntityIdentifierComponent.h:12
Definition Vec3.h:10
Definition WeakEntityRef.h:14
Definition flat_map.h:8
Definition ActorUniqueID.h:5
Definition PlayerLocationSender.h:43
Definition PlayerLocationSender.h:45
Definition PlayerLocationSender.h:31