LeviLamina
Loading...
Searching...
No Matches
ServerScoreboard.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/world/scores/ObjectiveSortOrder.h"
8#include "mc/world/scores/Scoreboard.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class BasicTimer;
15class CompoundTag;
17class EntityContext;
21class LevelStorage;
22class Objective;
23class PacketSender;
24class Player;
26struct ActorUniqueID;
28struct ScorePacketInfo;
29struct ScoreboardId;
30namespace Bedrock::PubSub { class Subscription; }
31// clang-format on
32
34public:
35 // ServerScoreboard inner types declare
36 // clang-format off
37 struct unit_test_ctor_t;
38 // clang-format on
39
40 // ServerScoreboard inner types define
42
43public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BasicTimer>> mSaveTimer;
47 ::ll::TypedStorage<8, 8, ::LevelStorage*> mLevelStorage;
48 ::ll::TypedStorage<1, 1, bool> mIsDirty;
49 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> const> mGameplayUserManager;
50 ::ll::TypedStorage<8, 24, ::std::vector<::Objective const*>> mTrackedObjectives;
51 ::ll::TypedStorage<8, 8, ::PacketSender*> mPacketSender;
52 ::ll::TypedStorage<8, 16, ::ScoreboardId> mLastUniqueSBID;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveSubscription;
54 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelStorageManagerStartLeaveGameSubscription;
55 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferencesSubscription;
56 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserRemovedSubscription;
57 // NOLINTEND
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62 // vIndex: 0
63 virtual ~ServerScoreboard() /*override*/;
64
65 // vIndex: 6
66 virtual void onObjectiveAdded(::Objective const& objective) /*override*/;
67
68 // vIndex: 7
69 virtual void onObjectiveRemoved(::Objective& objective) /*override*/;
70
71 // vIndex: 8
72 virtual void onScoreChanged(::ScoreboardId const& id, ::Objective const& obj) /*override*/;
73
74 // vIndex: 9
75 virtual void onPlayerScoreRemoved(::ScoreboardId const& id, ::Objective const& objective) /*override*/;
76
77 // vIndex: 13
78 virtual void setPacketSender(::PacketSender* sender) /*override*/;
79
80 // vIndex: 1
81 virtual ::DisplayObjective const* setDisplayObjective(
82 ::std::string const& displaySlotName,
83 ::Objective const& objective,
84 ::ObjectiveSortOrder const order
85 ) /*override*/;
86
87 // vIndex: 2
88 virtual ::Objective* clearDisplayObjective(::std::string const& displaySlotName) /*override*/;
89
90 // vIndex: 10
91 virtual void onPlayerJoined(::Player const& player) /*override*/;
92
93 // vIndex: 11
94 virtual void onPlayerIdentityUpdated(::PlayerScoreboardId const& playerId) /*override*/;
95
96 // vIndex: 12
97 virtual void tick() /*override*/;
98
99 // vIndex: 5
100 virtual ::ScoreboardId const& createScoreboardId(::Player const& player) /*override*/;
101
102 // vIndex: 4
103 virtual ::ScoreboardId const& createScoreboardId(::Actor const& entity) /*override*/;
104
105 // vIndex: 3
106 virtual ::ScoreboardId const& createScoreboardId(::std::string const& name) /*override*/;
107
108 // vIndex: 14
109 virtual void writeToLevelStorage() /*override*/;
110
111 // vIndex: 15
112 virtual bool isClientSide() const /*override*/;
113 // NOLINTEND
114
115public:
116 // member functions
117 // NOLINTBEGIN
118 MCAPI ServerScoreboard(
119 ::CommandSoftEnumRegistry registry,
120 ::LevelStorage* levelStorage,
121 ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> gameplayUserManager
122 );
123
124 MCAPI void
125 _clearAllScoreTagsForObjective(::std::string const& displaySlotName, ::DisplayObjective const& displayObjective);
126
127 MCAPI ::Player* _getPlayer(::ActorUniqueID entityID) const;
128
129 MCAPI void _onGameplayUserRemoved(::EntityContext& entity);
130
131 MCAPI void _onRemoveActorEntityReferences(::Actor& actor);
132
133 MCAPI void _onSaveEvent(::LevelStorage&);
134
135 MCAPI ::ScorePacketInfo _unpackIdentityDefToScorePacket(
136 ::ScoreboardIdentityRef const& identityDef,
137 ::std::string const& objName,
138 int score
139 );
140
141 MCAPI void
142 _updateAllScoreTagsForObjective(::std::string const& displaySlotName, ::DisplayObjective const& displayObjective);
143
144 MCAPI void _updateScoreTag(::ScoreboardId const& scoreboardId, bool assertOnFakePlayer);
145
146 MCAPI void deserialize(::std::unique_ptr<::CompoundTag> root);
147
148 MCAPI void initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector
149 );
150
151 MCAPI void intializeWithActorManager(::IActorManagerConnector& actorManagerConnector);
152
153 MCAPI ::std::unique_ptr<::CompoundTag> serialize() const;
154 // NOLINTEND
155
156public:
157 // constructor thunks
158 // NOLINTBEGIN
159 MCAPI void* $ctor(
160 ::CommandSoftEnumRegistry registry,
161 ::LevelStorage* levelStorage,
162 ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> gameplayUserManager
163 );
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCAPI void $dtor();
170 // NOLINTEND
171
172public:
173 // virtual function thunks
174 // NOLINTBEGIN
175 MCAPI void $onObjectiveAdded(::Objective const& objective);
176
177 MCAPI void $onObjectiveRemoved(::Objective& objective);
178
179 MCAPI void $onScoreChanged(::ScoreboardId const& id, ::Objective const& obj);
180
181 MCAPI void $onPlayerScoreRemoved(::ScoreboardId const& id, ::Objective const& objective);
182
183 MCAPI void $setPacketSender(::PacketSender* sender);
184
185 MCAPI ::DisplayObjective const* $setDisplayObjective(
186 ::std::string const& displaySlotName,
187 ::Objective const& objective,
188 ::ObjectiveSortOrder const order
189 );
190
191 MCAPI ::Objective* $clearDisplayObjective(::std::string const& displaySlotName);
192
193 MCAPI void $onPlayerJoined(::Player const& player);
194
195 MCAPI void $onPlayerIdentityUpdated(::PlayerScoreboardId const& playerId);
196
197 MCAPI void $tick();
198
199 MCAPI ::ScoreboardId const& $createScoreboardId(::Player const& player);
200
201 MCAPI ::ScoreboardId const& $createScoreboardId(::Actor const& entity);
202
203 MCAPI ::ScoreboardId const& $createScoreboardId(::std::string const& name);
204
205 MCAPI void $writeToLevelStorage();
206
207 MCFOLD bool $isClientSide() const;
208 // NOLINTEND
209
210public:
211 // vftables
212 // NOLINTBEGIN
213 MCAPI static void** $vftable();
214 // NOLINTEND
215};
Definition Actor.h:104
Definition BasicTimer.h:5
Definition CommandSoftEnumRegistry.h:10
Definition CompoundTag.h:13
Definition DisplayObjective.h:14
Definition EntityContext.h:16
Definition GameplayUserManager.h:22
Definition IActorManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelStorage.h:24
Definition Objective.h:17
Definition PacketSender.h:17
Definition Player.h:119
Definition ScoreboardIdentityRef.h:17
Definition Scoreboard.h:32
Definition ServerScoreboard.h:33
STL namespace.
Definition ActorUniqueID.h:5
Definition PlayerScoreboardId.h:5
Definition ScorePacketInfo.h:15
Definition ScoreboardId.h:10
Definition ServerScoreboard.h:41
Definition serialize.h:11